Updated doxygen comments. Removed some development debug logs. Increased user inactivity time to 4 minutes. More Dutch translations in the OTA update screens.

Mon, 25 Nov 2019 11:34:38 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 25 Nov 2019 11:34:38 +0100
changeset 41
d327e0aff62f
parent 40
4d8cca2d5b68
child 42
22a0f9810561

Updated doxygen comments. Removed some development debug logs. Increased user inactivity time to 4 minutes. More Dutch translations in the OTA update screens.

main/config.c file | annotate | diff | comparison | revisions
main/task_adc.c file | annotate | diff | comparison | revisions
main/task_user.c file | annotate | diff | comparison | revisions
main/task_user.h file | annotate | diff | comparison | revisions
main/updates.c file | annotate | diff | comparison | revisions
--- a/main/config.c	Sun Nov 24 12:08:01 2019 +0100
+++ b/main/config.c	Mon Nov 25 11:34:38 2019 +0100
@@ -1,6 +1,7 @@
 /**
  * @file config.c
- * @brief BrewBoard configuration files.
+ * @brief The 'co2meter' configuration data. These are stored in the 
+ *        spiffs filesystem in a flash partition.
  */
 
 #include "config.h"
--- a/main/task_adc.c	Sun Nov 24 12:08:01 2019 +0100
+++ b/main/task_adc.c	Mon Nov 25 11:34:38 2019 +0100
@@ -1,6 +1,6 @@
 /**
  * @file task_adc.c
- * @brief The FreeRTOS task to query the pressure sensors on ADC inputs.
+ * @brief The FreeRTOS task to query the pressure sensors connected to ADC inputs.
  *        The task will update the ADC_State structure.
  */
 
--- a/main/task_user.c	Sun Nov 24 12:08:01 2019 +0100
+++ b/main/task_user.c	Mon Nov 25 11:34:38 2019 +0100
@@ -18,8 +18,8 @@
 int					SubOffset = 0;			///< Submenu offset
 u8g2_t					u8g2;				///< A structure which will contain all the data for one display
 rotary_encoder_info_t			rinfo = { 0 };			///< Rotary encoder record
-rotary_encoder_event_t			event = { 0 };
-QueueHandle_t				event_queue;
+rotary_encoder_event_t			event = { 0 };			///< Rotary encoder events
+QueueHandle_t				event_queue;			///< Events queue
 static xQueueHandle                     gpio_evt_queue = NULL;          ///< Rotary pushbutton queue
 static int				PushDuration = 0;		///< Duration of the pushed button
 struct strStations			APs[10];			///< List of APs we know
@@ -28,7 +28,7 @@
 struct strStations			editAP;				///< Data of station to edit
 char					sensors[DS18B20_MAX][17];	///< Sensors to select
 
-extern const esp_app_desc_t		*app_desc;
+extern const esp_app_desc_t		*app_desc;			///< App description
 extern unit_t				units[3];			///< Pressure test units
 extern SemaphoreHandle_t		xSemaphoreUnits;		///< Units lock semaphore
 extern DS18B20_State            	*ds18b20_state;         	///< DS18B20 state
@@ -423,6 +423,13 @@
 
 
 
+/**
+ * @brief The list of detected DS18B20 sensors.
+ * @param no The unit index number.
+ * @param sub The submenu index number.
+ * @param offset The offset in the list.
+ */
+
 void screen_list_sensors(int no, int sub, int offset)
 {
     int		i;
@@ -471,6 +478,9 @@
 
 
 
+/**
+ * @brief The WiFi overview screen.
+ */
 void screen_wifi()
 {
     char	buf[65];
@@ -497,6 +507,10 @@
 
 
 
+/**
+ * @brief The WiFi setup menu.
+ * @param sub The submenu entry to hilite.
+ */
 void screen_wifi_setup(int sub)
 {
     screen_top("WiFi AP setup");
@@ -508,6 +522,11 @@
 
 
 
+/**
+ * @brief Show the list if WiFi Access Points.
+ * @param sub The sub entry line.
+ * @param offset The offset in the list.
+ */
 void screen_list_aps(int sub, int offset)
 {
     int			i;
@@ -531,7 +550,6 @@
 	    num_ssids++;
 	}
     }
-//printf("loaded %d SSIDs sub %d  offset %d\n", num_ssids, sub, offset);
 
     screen_top("WiFi AP lijst");
     if (num_ssids == 0) {
@@ -550,6 +568,10 @@
 
 
 
+/**
+ * @brief Edit WiFi AP menu.
+ * @param sub The menu entry to hilite.
+ */
 void screen_edit_ap(int sub)
 {
     screen_top("WiFi wijzig AP");
@@ -564,6 +586,9 @@
 
 
 
+/**
+ * @brief The network status screen.
+ */
 void screen_network()
 {
     char	ip[17], nm[17], gw[17];
@@ -587,6 +612,10 @@
 
 
 
+/**
+ * @brief The network setup menu.
+ * @param sub The menu entry to hilite.
+ */
 void screen_network_setup(int sub)
 {
     screen_top("Netwerk setup");
@@ -598,6 +627,9 @@
 
 
 
+/**
+ * @brief MQTT status
+ */
 void screen_mqtt()
 {
     screen_top("MQTT Status");
@@ -609,6 +641,10 @@
 
 
 
+/**
+ * @brief MQTT setup menu.
+ * @param sub The submenu entry to hilite.
+ */
 void screen_mqtt_setup(int sub)
 {
     screen_top("MQTT Setup");
@@ -621,6 +657,9 @@
 
 
 
+/**
+ * @brief The OTA update menu.
+ */
 void screen_update()
 {
     screen_top("Update software");
@@ -630,6 +669,11 @@
 
 
 
+/**
+ * @brief The update status screen.
+ * @param m1 The first message line or NULL.
+ * @param m2 The second message line or NULL.
+ */
 void screen_updating(char *m1, char *m2)
 {
     screen_top("Bijwerken ...");
@@ -756,6 +800,9 @@
 
 
 
+/**
+ * @brief Handle menu changes.
+ */
 void menu_change(void)
 {
     if (New_Loop2 != Main_Loop2) {
@@ -768,19 +815,16 @@
                 break;
 
             case ML2_USER:
-                ESP_LOGI(TAG, "Loop user: User mainmenu");
                 screen_main();
                 break;
 
             case ML2_UNIT1:
             case ML2_UNIT2:
             case ML2_UNIT3:
-                ESP_LOGI(TAG, "Loop user: Unit %d", Main_Loop2 - ML2_UNIT1);
                 screen_unit(Main_Loop2 - ML2_UNIT1);
                 break;
 
             case ML2_WIFI:
-                ESP_LOGI(TAG, "Loop user: WiFi");
                 screen_wifi();
                 break;
 
@@ -801,7 +845,6 @@
 		break;
 
             case ML2_NETWORK:
-                ESP_LOGI(TAG, "Loop user: Network");
                 screen_network();
                 break;
 
@@ -811,7 +854,6 @@
 		break;
 
             case ML2_MQTT:
-                ESP_LOGI(TAG, "Loop user: MQTT");
                 screen_mqtt();
                 break;
 
@@ -821,7 +863,6 @@
 		break;
 
             case ML2_UPDATE:
-                ESP_LOGI(TAG, "Loop user: Update");
                 screen_update();
                 break;
 
@@ -863,6 +904,9 @@
 
 
 
+/**
+ * @brief Handle rotary switch for menu navigation.
+ */
 void menu_rotary(void)
 {
     switch (Main_Loop2) {
@@ -928,6 +972,9 @@
 
 
 
+/**
+ * @brief Pressed keys actions
+ */
 void menu_loop(void)
 {
     int 	idx = 0;
--- a/main/task_user.h	Sun Nov 24 12:08:01 2019 +0100
+++ b/main/task_user.h	Mon Nov 25 11:34:38 2019 +0100
@@ -12,7 +12,7 @@
 #define ROT_ENC_A_GPIO          (CONFIG_ROT_ENC_A_GPIO)
 #define ROT_ENC_B_GPIO          (CONFIG_ROT_ENC_B_GPIO)
 #define ROT_ENC_SW_GPIO         (CONFIG_ROT_ENC_SW_GPIO)
-#define INACTIVITY              120                                     ///< User inactivity time
+#define INACTIVITY              240                                     ///< User inactivity time
 
 #define EDIT_TYPE_TEXT          0                                       ///< Editor type is text, special chars and digits.
 #define	EDIT_TYPE_CAPS		1					///< Editor alpha capitals, some specials and digits.
--- a/main/updates.c	Sun Nov 24 12:08:01 2019 +0100
+++ b/main/updates.c	Mon Nov 25 11:34:38 2019 +0100
@@ -111,7 +111,7 @@
 	goto updateerr;
     }
 
-    screen_updating("Begin download", NULL);
+    screen_updating("Start download", NULL);
     ESP_LOGI(TAG, "Download update %s size %d", update.url, content_length);
     int binary_file_length = 0;
     /*deal with all receive packet*/
@@ -167,7 +167,7 @@
 			goto updateerr;
                     }
                     ESP_LOGI(TAG, "Continue upgrade application");
-		    screen_updating("Begin download", "New version");
+		    screen_updating("Start download", "Nieuwe versie!");
                 } else {
                     ESP_LOGE(TAG, "Received package is not fit len");
                     http_cleanup(client);
@@ -208,7 +208,7 @@
     }
 
     ESP_LOGI(TAG, "Prepare to restart system!");
-    screen_updating("Herstar ...", "... Herstart");
+    screen_updating("Herstart ...", "... Herstart");
     vTaskDelay(1000 / portTICK_PERIOD_MS);
     update_running = 0;
     esp_restart();

mercurial