add interface to clear sensor cfg.
This commit is contained in:
parent
f0ade9888d
commit
3d732601df
@ -615,9 +615,19 @@ void SensorScheduler::ModifyScheduleTs(int diff_ts) {
|
||||
out_file.close();
|
||||
}
|
||||
|
||||
void SensorScheduler::ClearScheduleCfg() {
|
||||
void SensorScheduler::ClearScheduleCfg(int short_addr) {
|
||||
zlog_warn(zbt, "[ClearScheduleCfg] clear all schedule config");
|
||||
if (short_addr == 0) {
|
||||
update_.clear();
|
||||
upgrade_.clear();
|
||||
ShortAddrCfg::ClearCfg();
|
||||
UpdateCfg::ClearCfg();
|
||||
UpgradeCfg::ClearCfg();
|
||||
} else {
|
||||
UpdateConfigResult(short_addr, 0);
|
||||
UpgradeResult(short_addr, kUpgradeSuccess);
|
||||
short_addr_map_.erase(short_addr);
|
||||
ShortAddrCfg::WriteCfg(short_addr_map_);
|
||||
}
|
||||
|
||||
}
|
||||
@ -92,7 +92,7 @@ public:
|
||||
void AdjustSupportModification(bool support_modification);
|
||||
// ======schedule.json操作结束======
|
||||
|
||||
void ClearScheduleCfg();
|
||||
void ClearScheduleCfg(int short_addr = 0);
|
||||
|
||||
long GetLocalTs();
|
||||
long GetLocalWorldTime(std::string &world_time);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user