|
@@ -19,7 +19,7 @@ unsigned char eid[10]; //
|
|
|
|
|
|
uint8_t XbeeConst_DeviceAddress = 0x01;
|
|
uint8_t XbeeConst_DeviceAddress = 0x01;
|
|
uint8_t XbeeConst_NetAddress = 0x00;
|
|
uint8_t XbeeConst_NetAddress = 0x00;
|
|
-uint8_t XbeeConst_UseAPI = 0x00;
|
|
|
|
|
|
+uint8_t XbeeConst_UseAPI = 0x01;
|
|
uint8_t WeightConst_TQ = 0x05;//0x05;
|
|
uint8_t WeightConst_TQ = 0x05;//0x05;
|
|
uint8_t WeightConst_BLE = 0;
|
|
uint8_t WeightConst_BLE = 0;
|
|
uint8_t WeightConst_ChanCheShu = 0x02;
|
|
uint8_t WeightConst_ChanCheShu = 0x02;
|
|
@@ -105,7 +105,9 @@ static fdb_time_t get_keydbtime(void)
|
|
void write_Flash(const char *key, const void *value_buf, size_t buf_len)
|
|
void write_Flash(const char *key, const void *value_buf, size_t buf_len)
|
|
{
|
|
{
|
|
struct fdb_blob blob;
|
|
struct fdb_blob blob;
|
|
- fdb_kv_set_blob(&kvdb, key, fdb_blob_make(&blob, (void *)value_buf, buf_len));
|
|
|
|
|
|
+ fdb_err_t tmperr = fdb_kv_set_blob(&kvdb, key, fdb_blob_make(&blob, (void *)value_buf, buf_len));
|
|
|
|
+ while ( tmperr == FDB_ERASE_ERR || tmperr == FDB_WRITE_ERR)
|
|
|
|
+ tmperr = fdb_kv_set_blob(&kvdb, key, fdb_blob_make(&blob, (void *)value_buf, buf_len));
|
|
}
|
|
}
|
|
|
|
|
|
void reset_read_ts(const char key)
|
|
void reset_read_ts(const char key)
|