V2.0.7
This commit is contained in:
@ -28,7 +28,7 @@ void callback(char* topic, byte* payload, unsigned int length) {
|
||||
// Serial.println();
|
||||
|
||||
|
||||
uint8_t read_buff[1024 * 10];
|
||||
uint8_t read_buff[1024 * 1];
|
||||
memcpy(read_buff,payload,length);
|
||||
uint32_t data_length = length;
|
||||
data_length = IRIS_Cut_Befor_Header(read_buff,data_length);
|
||||
@ -68,6 +68,10 @@ void gsmm_mqtt_loop_task(void *pvParameters)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (!mqtt_client->connected()) {
|
||||
reconnect();
|
||||
}
|
||||
|
||||
EventBits_t uxBits = xEventGroupGetBits(http_event_group);
|
||||
if (uxBits & mqtt_stop_bit)
|
||||
{
|
||||
@ -77,9 +81,7 @@ void gsmm_mqtt_loop_task(void *pvParameters)
|
||||
xEventGroupClearBits(http_event_group, mqtt_stop_bit);
|
||||
}
|
||||
|
||||
if (!mqtt_client->connected()) {
|
||||
reconnect();
|
||||
}
|
||||
|
||||
mqtt_client->loop();
|
||||
gsmmanger->loop();
|
||||
|
||||
@ -123,7 +125,7 @@ void gsmm_mqtt_init(String sensor_id)
|
||||
|
||||
// http = new HttpClient(*gsmmanger->client, "82.156.1.111");
|
||||
http = new HttpClient(*gsmmanger->client, mqtt_server);
|
||||
xTaskCreatePinnedToCore(gsmm_mqtt_loop_task, "gsmm_mqtt_loop_task",1024*3,NULL, 1, NULL, 1);
|
||||
xTaskCreatePinnedToCore(gsmm_mqtt_loop_task, "gsmm_mqtt_loop_task",1024*5,NULL, 1, NULL, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
25
src/main.cpp
25
src/main.cpp
@ -280,12 +280,12 @@ void setup()
|
||||
// }
|
||||
|
||||
|
||||
Serial.println("IS_SN :" +STRSensorInfos_structure.serialnumber);
|
||||
write_log(log_path,"IS_SN :" +STRSensorInfos_structure.serialnumber,20);
|
||||
|
||||
// is11Sensor->guangpu_bochang.a1 = 0.000000000000000;
|
||||
// is11Sensor->guangpu_bochang.a2 = 0.000000000;
|
||||
sys_sd_doc["firmware"] = "V2.0.5";
|
||||
sys_sd_doc["version"] = "V2.0.5";
|
||||
sys_sd_doc["firmware"] = "V2.0.7";
|
||||
sys_sd_doc["version"] = "V2.0.7";
|
||||
sys_info_init();
|
||||
|
||||
// dingbiao_init("/dingbiao/dingbiao_up_gain.bin");
|
||||
@ -1041,15 +1041,16 @@ void OTA_task(void *pvParameters)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned char command_data[1024*1];
|
||||
u_char send_buff[1000];
|
||||
void receive_command_unpack(uint8_t * read_buf,uint16_t data_length,uint8_t port_type)
|
||||
{
|
||||
|
||||
unsigned char command_data[1024*10];
|
||||
unsigned char data_type;
|
||||
String send_data ;
|
||||
int send_lenth;
|
||||
uint8_t low_power_sta = 1;
|
||||
u_char send_buff[300];
|
||||
|
||||
|
||||
|
||||
int ret = IRIS_STM32_Protocol_Unpack(read_buf,data_length,&data_type,command_data);
|
||||
@ -1361,7 +1362,7 @@ void json_command(uint8_t port_type)
|
||||
int ret;
|
||||
bool save = false;
|
||||
String send_str;
|
||||
u_char send_buff[1000];
|
||||
// u_char send_buff[1000];
|
||||
String json_str;
|
||||
|
||||
|
||||
@ -2516,11 +2517,19 @@ void json_command(uint8_t port_type)
|
||||
|
||||
setupmsc();
|
||||
|
||||
vTaskSuspend(Task0_Handler);
|
||||
|
||||
vTaskSuspend(Task1_Handler);
|
||||
// vTaskSuspend(Task2_Handler);
|
||||
if(sys_sd_doc["status_4g"] == "open_4g")
|
||||
{
|
||||
vTaskSuspend(A4G_Handler);
|
||||
vTaskSuspend(OTA_Handler);
|
||||
}
|
||||
else
|
||||
{
|
||||
vTaskSuspend(Task0_Handler);
|
||||
}
|
||||
|
||||
}
|
||||
//command 38
|
||||
else if(doc["command"] == "reboot")
|
||||
|
||||
Reference in New Issue
Block a user