main/task_user.c

changeset 37
358bbd5b608e
parent 36
e2a43e7c4035
child 38
46e2c385e9de
--- a/main/task_user.c	Sat Nov 23 19:10:05 2019 +0100
+++ b/main/task_user.c	Sat Nov 23 21:43:14 2019 +0100
@@ -1149,8 +1149,6 @@
 
 void task_user(void *pvParameter)
 {
-    esp_err_t           ret;
-
     ESP_LOGI(TAG, "Starting User task");
     Main_Loop2 = -1;
 
@@ -1187,22 +1185,22 @@
 
     gpio_isr_handler_add(ROT_ENC_SW_GPIO, gpio_isr_handler, (void*) ROT_ENC_SW_GPIO);
 
-    // Create a queue for events from the rotary encoder driver.
-    // Tasks can read from this queue to receive up to date position information.
+    /*
+     * Create a queue for events from the rotary encoder driver.
+     * Tasks can read from this queue to receive up to date position information.
+     */
     event_queue = rotary_encoder_create_queue();
     ESP_ERROR_CHECK(rotary_encoder_set_queue(&rinfo, event_queue));
 
+    /*
+     * Create a one second periodic timer.
+     */
     esp_timer_create_args_t timerSecond = {
         .callback = &TimerCallback,
         .name = "SecondsTimer"
     };
-
-    /*
-     * Create a one second periodic timer.
-     */
     ESP_ERROR_CHECK(esp_timer_create(&timerSecond, &timerHandle));
-    ret = esp_timer_start_periodic(timerHandle, 1000000);
-    assert(ret == ESP_OK);
+    ESP_ERROR_CHECK(esp_timer_start_periodic(timerHandle, 1000000));
 
     EventBits_t uxBits;
 
@@ -1258,20 +1256,5 @@
 	    xEventGroupClearBits(xEventGroupUser, TASK_USER_WAKEUP);
 	}
     }
-
-// If not configured, start configure
-// If configured select first unit
-// Handle screen (first is show measured values)
-// Display per unit. Temp + Pressure + state. Press is setup this sensor.
-// Setup menu: 	Sensors
-//		WiFi
-//		MQTT
-//		System (timers etc)
-//		Update OTA
-//		Return
-
-// Sensors menu:	Assignments, turn to choose one.
-// Sensors setup menu:	DS18B20 addr	Press is assign
-//			DS18B20 addr
 }
 

mercurial