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
|
//Global Info
|
||||||
if(has_changed.global) {
|
if(false && has_changed.global) {
|
||||||
timeval tv{};
|
timeval tv{};
|
||||||
gettimeofday(&tv, nullptr);
|
gettimeofday(&tv, nullptr);
|
||||||
size_t uptime = xTaskGetTickCount() * portTICK_PERIOD_MS / 1000;
|
size_t uptime = xTaskGetTickCount() * portTICK_PERIOD_MS / 1000;
|
||||||
|
@ -250,18 +250,6 @@ void websocket_task(void *pvParameter) {
|
||||||
|
|
||||||
|
|
||||||
taskYIELD();
|
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();
|
syslog_detach();
|
||||||
|
@ -470,8 +458,13 @@ extern "C" void httpd_task(void *pvParameters) {
|
||||||
// register handlers and start the server
|
// register handlers and start the server
|
||||||
http_set_cgi_handlers(pCGIs, sizeof(pCGIs) / sizeof(pCGIs[0]));*/
|
http_set_cgi_handlers(pCGIs, sizeof(pCGIs) / sizeof(pCGIs[0]));*/
|
||||||
//while (!uxSemaphoreGetCount(wifi_available_semaphore))
|
//while (!uxSemaphoreGetCount(wifi_available_semaphore))
|
||||||
// taskYIELD();
|
// vTaskDelay(500 / portTICK_PERIOD_MS);
|
||||||
printf("httpd_task: wifi is available\n");
|
/*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);
|
websocket_register_callbacks((tWsOpenHandler) websocket_open_cb, (tWsHandler) websocket_cb);
|
||||||
httpd_init();
|
httpd_init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue