stash
This commit is contained in:
parent
4ac93fc90e
commit
d666a18cec
1 changed files with 8 additions and 15 deletions
|
@ -77,7 +77,7 @@ void websocket_task(void *pvParameter) {
|
|||
}
|
||||
|
||||
//Global Info
|
||||
if(has_changed.global) {
|
||||
if(false && has_changed.global) {
|
||||
timeval tv{};
|
||||
gettimeofday(&tv, nullptr);
|
||||
size_t uptime = xTaskGetTickCount() * portTICK_PERIOD_MS / 1000;
|
||||
|
@ -250,18 +250,6 @@ void websocket_task(void *pvParameter) {
|
|||
|
||||
|
||||
taskYIELD();
|
||||
{
|
||||
uint8_t response[3];
|
||||
uint16_t val;
|
||||
val = sdk_system_adc_read();
|
||||
response[2] = (uint8_t) val;
|
||||
response[1] = val >> 8;
|
||||
response[0] = 'V';
|
||||
LOCK_TCPIP_CORE();
|
||||
websocket_write(pcb, response, 3, WS_BIN_MODE);
|
||||
UNLOCK_TCPIP_CORE();
|
||||
}
|
||||
vTaskDelayMs(500);
|
||||
}
|
||||
|
||||
syslog_detach();
|
||||
|
@ -470,8 +458,13 @@ extern "C" void httpd_task(void *pvParameters) {
|
|||
// register handlers and start the server
|
||||
http_set_cgi_handlers(pCGIs, sizeof(pCGIs) / sizeof(pCGIs[0]));*/
|
||||
//while (!uxSemaphoreGetCount(wifi_available_semaphore))
|
||||
// taskYIELD();
|
||||
printf("httpd_task: wifi is available\n");
|
||||
// vTaskDelay(500 / portTICK_PERIOD_MS);
|
||||
/*tCGI pCGIs[] = {
|
||||
{"/gpio", (tCGIHandler) gpio_cgi_handler},
|
||||
};
|
||||
|
||||
// register handlers and start the server
|
||||
http_set_cgi_handlers(pCGIs, sizeof(pCGIs) / sizeof(pCGIs[0]));*/
|
||||
websocket_register_callbacks((tWsOpenHandler) websocket_open_cb, (tWsHandler) websocket_cb);
|
||||
httpd_init();
|
||||
|
||||
|
|
Loading…
Reference in a new issue