This commit is contained in:
j3d1 2022-06-27 20:00:48 +02:00
parent 79f2712368
commit 4ac93fc90e
3 changed files with 10 additions and 7 deletions

View file

@ -8,6 +8,6 @@ RUN cd app/modules/sdk; export CT_EXPERIMENTAL=y; export CT_ALLOW_BUILD_AS_ROOT=
USER 0 USER 0
RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial
RUN apt install -y --reinstall python-is-python3 RUN apt install -y --reinstall python-is-python3
USER 0 USER 1000
WORKDIR /app WORKDIR /app
ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH

View file

@ -39,7 +39,7 @@ void user_init(void) {
wifi_alive = xSemaphoreCreateBinary(); wifi_alive = xSemaphoreCreateBinary();
publish_queue = xQueueCreate(3, PUB_MSG_LEN); publish_queue = xQueueCreate(3, PUB_MSG_LEN);
//xTaskCreate(&beat_task, "beat_task", 256, NULL, 3, NULL); xTaskCreate(&beat_task, "beat_task", 256, NULL, 3, NULL);
} }

View file

@ -30,7 +30,6 @@ using namespace fiatlux;
int version = 23; int version = 23;
#define vTaskDelayMs(ms) vTaskDelay((ms) / portTICK_PERIOD_MS) #define vTaskDelayMs(ms) vTaskDelay((ms) / portTICK_PERIOD_MS)
const char hex_lookup[] = "0123456789ABCDEF\0\0"; const char hex_lookup[] = "0123456789ABCDEF\0\0";
@ -249,7 +248,8 @@ void websocket_task(void *pvParameter) {
//printf("9: %d\n",gpio_read(9)); //printf("9: %d\n",gpio_read(9));
//printf("10: %d\n",gpio_read(10)); //printf("10: %d\n",gpio_read(10));
vTaskDelayMs(250);
taskYIELD();
{ {
uint8_t response[3]; uint8_t response[3];
uint16_t val; uint16_t val;
@ -469,6 +469,9 @@ 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))
// taskYIELD();
printf("httpd_task: wifi is available\n");
websocket_register_callbacks((tWsOpenHandler) websocket_open_cb, (tWsHandler) websocket_cb); websocket_register_callbacks((tWsOpenHandler) websocket_open_cb, (tWsHandler) websocket_cb);
httpd_init(); httpd_init();