测试远程读配置与写配置驱动时,如果远程复位,则上位机复位后,程序就异常了
This commit is contained in:
parent
1def56eb47
commit
857a4b434d
File diff suppressed because it is too large
Load Diff
|
@ -1206,7 +1206,7 @@ BspMdExCode bcu_modbus_485_0x06_fun(uint16_t start_addr, uint16_t reg_num, uint8
|
|||
data = (buf[0] << 8) + buf[1];
|
||||
|
||||
//kit_time_dly_ms(50);
|
||||
if((start_addr >= 3000) && (start_addr <= 3149))
|
||||
if((start_addr >= 3000) && (start_addr <= 3169))
|
||||
{
|
||||
bcu_data_set_0x06_msg(start_addr, data);
|
||||
*len = reg_num << 1;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,6 +7,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
#include "drv_qfc41d.h"
|
||||
#include "eeprom_manager.h"
|
||||
|
||||
uint8_t rev_buff[QFC41D_MAX_RECV_SIZE] = {0};
|
||||
uint8_t send_buff[QFC41D_MAX_SEND_SIZE] = {0};
|
||||
|
@ -98,8 +99,17 @@ void parse_mqtt_message(char* message)
|
|||
if(strstr(message, "control") != NULL)
|
||||
{
|
||||
buffer[0] = (second >> 8) & 0xFF;
|
||||
buffer[1] = second & 0xFF;
|
||||
data = bcu_modbus_485_0x06_fun(first, 1, buffer, &length);
|
||||
buffer[1] = second & 0xFF;
|
||||
if (first == 3156 && second == 1)
|
||||
{
|
||||
bms_soft_reset_save(kSoftReset_CmdCtrl, NULL, 0);
|
||||
drv_misc_reset_mcu();
|
||||
}
|
||||
else
|
||||
{
|
||||
data = bcu_modbus_485_0x06_fun(first, 1, buffer, &length);
|
||||
}
|
||||
|
||||
|
||||
if (data == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue