所有messageQueue ID都初始化,防止出现异常 1431/2 1431/head 1433/target/1 1434/target/1
authorSnickerSun <snickersun@163.com>
Wed, 20 Nov 2024 08:54:06 +0000 (16:54 +0800)
committerSnickerSun <snickersun@163.com>
Wed, 20 Nov 2024 08:54:06 +0000 (16:54 +0800)
code/sdk/application/battery/service/battery_service.cpp
code/sdk/application/wearable/service/ble_service/bleservice/bleService.c
code/sdk/drivers/peripheral/a5133/service/a5133_service.cpp
code/sdk/drivers/peripheral/acc/service/acc_service.c
code/sdk/drivers/peripheral/mag/service/mag_service.c
code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp
code/sdk/drivers/peripheral/slip/uart_slip.c
code/sdk/drivers/peripheral/utils/custom_cmd_service.c
code/sdk/drivers/peripheral/utils/custom_fileoperate_service.c
code/sdk/drivers/peripheral/vibrator/service/vibrator_service.cpp
code/sdk/test/common/testsuite/src/test_suite_task.c

index 22c7774..04a900a 100644 (file)
@@ -78,7 +78,7 @@ osTimerId_t g_battery_timer = NULL;
 #define DISABLE_CHARGE_CHECK_MS 1000
 #define ENABLE_CHARGE_TIMEOUT_MS 10000 * 4
 bool last_battery_charge_enable_status=true; // true上次刚设置在充电状态,false 上次设置不在充电状态。注意这个是充电IC的充电开关设置,并非真正处于充电状态的标识。
-static unsigned long g_app_queue;
+static unsigned long g_app_queue = 0xFFFFFFFF;
 #define BATTERY_CMD_CHECK_VOLTAGE 0x11
 #define BATTERY_CMD_CHARGE_PLUG 0x13
 #define BATTERY_CMD_CHARGE_UNPLUG 0x14
index ffb8fbd..bfb3f2c 100644 (file)
@@ -1858,7 +1858,7 @@ typedef struct
 } blesrv_custom_cmd_t;\r
 \r
 #define MAX_BUF_LEN  sizeof(blesrv_custom_cmd_t) //sizeof(blesrv_custom_cmd_t) /*MTU max 514 , sizeof(blesrv_custom_cmd_t)*/\r
-static unsigned long g_blesrv_queue;\r
+static unsigned long g_blesrv_queue = 0xFFFFFFFF;\r
 static uint8_t g_blesrv_queue_created = 0;\r
 \r
 void blesrv_service_recv_msg_handler(uint16_t srv_handle, uint8_t * msg_data, uint32_t msg_len)\r
index 414022e..99e5cb1 100644 (file)
@@ -55,7 +55,7 @@ static bool g_a5133_service_initialled = false;
 #define A5133_SERVICE_MSG_COUNT       16
 #define A5133_SERVICE_TASK_SIZE       0x1000
 
-static unsigned long g_app_queue;
+static unsigned long g_app_queue= 0xFFFFFFFF;
 
 static bool a5133_service_running_stat = false;
 static bool a5133_sensor_exist = false;
index 25a5d21..bb693fe 100644 (file)
@@ -45,7 +45,7 @@ osTimerId_t g_acc_service_timer = NULL;
 
 static bool g_bat_timer_is_running = false;
 #define ACC_CHECK_MS 100
-static unsigned long g_app_queue;
+static unsigned long g_app_queue= 0xFFFFFFFF;
 
 static bool acc_service_running_stat = false;
 static void acc_service_check_timer_callback(void* data);
index e542d3b..bab12f6 100644 (file)
@@ -83,7 +83,7 @@ static bool g_mag_sensor_exist = false;
 
 static bool g_bat_timer_is_running = false;
 #define MAG_CHECK_MS 40
-static unsigned long g_app_queue;
+static unsigned long g_app_queue= 0xFFFFFFFF;
 
 static bool mag_service_running_stat = false;
 static void mag_service_check_timer_callback(void* data);
index e32fdca..934be63 100644 (file)
@@ -63,7 +63,7 @@ uint8_t light_databuf[64] = {0};
 #define PPG_SERVICE_TASK_PRIO       5
 
 #define MAG_CHECK_MS 20
-static unsigned long g_app_queue;
+static unsigned long g_app_queue= 0xFFFFFFFF;
 
 static bool ppg_service_running_stat = false;
 static bool ppg_sensor_exist = false;
index 6b38077..803ae8d 100644 (file)
@@ -36,7 +36,7 @@ struct netif sl_netif;
 
 #define UART_SLIP_CMD_MSG_READ_DATA 0x01
 #define UART_SLIP_CMD_MSG_FLUSH_DATA 0x02
-static unsigned long g_slip_cmd_queue;
+static unsigned long g_slip_cmd_queue= 0xFFFFFFFF;
 #define MAX_BUFFER_SIZE (128)
 typedef struct {
     uint8_t cmd;
index cb7691c..21cf367 100644 (file)
@@ -55,7 +55,7 @@ typedef struct
  */
 
 static bool g_bat_timer_is_running = false;
-static unsigned long g_custom_cmd_queue;
+static unsigned long g_custom_cmd_queue= 0xFFFFFFFF;
 static bool g_custom_cmd_queue_created = 0;
 static bool custom_cmd_service_running_stat = false;
 
index 8b50c54..f7e7556 100644 (file)
@@ -63,7 +63,7 @@ typedef struct
  */
 
 static bool g_bat_timer_is_running = false;
-static unsigned long g_custom_fileoperate_queue;
+static unsigned long g_custom_fileoperate_queue= 0xFFFFFFFF;
 static bool g_custom_fileoperate_queue_created = 0;
 static bool custom_fileoperate_service_running_stat = false;
 
index e6865fd..85e911c 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: penglei 1624952103@qq.com
  * @Date: 2024-08-08 16:33:23
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-11-13 16:51:45
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-11-20 16:45:27
  * @FilePath: /FD230/code/sdk/drivers/peripheral/vibrator/service/vibrator_service.cpp
  * @Description: 
  * 
@@ -135,7 +135,7 @@ void ui_api_vibrate_once_with_judgement_func(void)
 
 
 #define MAG_CHECK_MS 20
-static unsigned long g_app_queue;
+static unsigned long g_app_queue= 0xFFFFFFFF;
 
 static bool vibrator_service_running_stat = false;
 
index 275e5e9..5952da1 100755 (executable)
@@ -24,7 +24,7 @@
 #define CONFIG_TEST_SUITE_COMMAND_BUFFER_SIZE   300
 
 osal_task *g_test_suite_task_id = NULL;
-unsigned long g_test_suite_msgqueue_id;
+unsigned long g_test_suite_msgqueue_id= 0xFFFFFFFF;
 static char g_test_suite_command_buffer_array[CONFIG_TEST_SUITE_COMMAND_BUFFER_SIZE + 1];
 static bool g_exit_test_suite_task = false;