修复bug
diff --git a/supwisdom/sp_data.c b/supwisdom/sp_data.c
index f2fdac3..3aa77f3 100644
--- a/supwisdom/sp_data.c
+++ b/supwisdom/sp_data.c
@@ -347,11 +347,12 @@
uint16 sp_config_init(sp_pos_t* pos)
{
- uint16 ret = 0;
uint8 crc[2];
sp_config_t config;
- MEMCLEAR(&config, sizeof(config));
disp_hint_info_two(pos,"É豸²ÎÊý³õʼ»¯", "ÇëÉÔµÈ...",0);
+ MEMCLEAR(&config, sizeof(config));
+ config.deviceno = 1;
+ MEMCPY(config.devphyid,"\x40\x12\x01\x00",4);
sp_protocol_crc((uint8*)&config,sizeof(sp_config_t)-2,config.crc);
sp_flash_erase(ADDR_CONFIG_PARA);
sp_flash_write(ADDR_CONFIG_PARA,(uint8*)&config,sizeof(sp_config_t));
@@ -361,6 +362,5 @@
{
return RC_CONFPARA_CRC_ERR;
}
- ret = sp_flash_erase(ADDR_CONFIG_PARA);
- return ret;
+ return sp_parse_config(pos, config);
}