stash
This commit is contained in:
		
							parent
							
								
									79f2712368
								
							
						
					
					
						commit
						4ac93fc90e
					
				
					 3 changed files with 10 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -8,6 +8,6 @@ RUN cd app/modules/sdk; export CT_EXPERIMENTAL=y; export CT_ALLOW_BUILD_AS_ROOT=
 | 
			
		|||
USER 0
 | 
			
		||||
RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial
 | 
			
		||||
RUN apt install -y --reinstall python-is-python3
 | 
			
		||||
USER 0
 | 
			
		||||
USER 1000
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,7 +39,7 @@ void user_init(void) {
 | 
			
		|||
    wifi_alive = xSemaphoreCreateBinary();
 | 
			
		||||
    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);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,6 @@ using namespace fiatlux;
 | 
			
		|||
 | 
			
		||||
int version = 23;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define vTaskDelayMs(ms) vTaskDelay((ms) / portTICK_PERIOD_MS)
 | 
			
		||||
 | 
			
		||||
const char hex_lookup[] = "0123456789ABCDEF\0\0";
 | 
			
		||||
| 
						 | 
				
			
			@ -114,11 +113,11 @@ void websocket_task(void *pvParameter) {
 | 
			
		|||
            UNLOCK_TCPIP_CORE();*/
 | 
			
		||||
 | 
			
		||||
            taskYIELD();
 | 
			
		||||
        }  else if(has_changed.lights) {
 | 
			
		||||
        } else if(has_changed.lights) {
 | 
			
		||||
            messages::frame<messages::lights> frame;
 | 
			
		||||
            frame.cmd = messages::LIGHTS;
 | 
			
		||||
            frame.msg.top_color = *(uint32_t*)&top_color;
 | 
			
		||||
            frame.msg.bottom_color = *(uint32_t*)&bottom_color;
 | 
			
		||||
            frame.msg.top_color = *(uint32_t *) &top_color;
 | 
			
		||||
            frame.msg.bottom_color = *(uint32_t *) &bottom_color;
 | 
			
		||||
            frame.msg.white_brightness = light_value;
 | 
			
		||||
            LOCK_TCPIP_CORE();
 | 
			
		||||
            websocket_write(pcb, (unsigned char *) &frame, sizeof(frame), WS_BIN_MODE);
 | 
			
		||||
| 
						 | 
				
			
			@ -249,7 +248,8 @@ void websocket_task(void *pvParameter) {
 | 
			
		|||
        //printf("9: %d\n",gpio_read(9));
 | 
			
		||||
        //printf("10: %d\n",gpio_read(10));
 | 
			
		||||
 | 
			
		||||
        vTaskDelayMs(250);
 | 
			
		||||
 | 
			
		||||
        taskYIELD();
 | 
			
		||||
        {
 | 
			
		||||
            uint8_t response[3];
 | 
			
		||||
            uint16_t val;
 | 
			
		||||
| 
						 | 
				
			
			@ -469,6 +469,9 @@ 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");
 | 
			
		||||
    websocket_register_callbacks((tWsOpenHandler) websocket_open_cb, (tWsHandler) websocket_cb);
 | 
			
		||||
    httpd_init();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue