modify log info.

This commit is contained in:
pandx 2024-11-12 15:16:59 +08:00
parent ef79730ddb
commit 01e7838b90

View File

@ -14,16 +14,6 @@
extern zlog_category_t *zct;
extern zlog_category_t *zbt;
void SensorScheduler::CleanIdleOccupiedSet(long ts) {
if (free_slice_ocuppied_.size() > 5) {
for (auto it = free_slice_ocuppied_.begin(); it != free_slice_ocuppied_.end();) {
if ((*it) < ts) {
it = free_slice_ocuppied_.erase(it);
} else ++it;
}
}
}
int SensorScheduler::StartSchedule(int short_addr, int &next_duration) {
int id = 0;
auto iter = short_addr_map_.find(short_addr);
@ -58,12 +48,12 @@ int SensorScheduler::StartSchedule(int short_addr, int &next_duration) {
// 传感器需要执行上送特征值任务, 如果有配置需要下发的话,下发配置
if (update_.count(id)) {
// execute config
zlog_warn(zct, "[%d] update config in eigen slice", id);
zlog_warn(zct, "[%d:%x] update config in eigen slice", id, short_addr);
current_request_ = kScheduleConfigSensor;
return kScheduleConfigSensor;
} else {
// 执行上送特征值任务
zlog_warn(zct, "[%d] send eigen value in eigen slice", id);
zlog_warn(zct, "[%d:%x] send eigen value in eigen slice", id, short_addr);
current_request_ = kScheduleEigenValue;
return kScheduleEigenValue;
}
@ -648,4 +638,14 @@ void SensorScheduler::ClearScheduleCfg(int short_addr) {
ShortAddrCfg::WriteCfg(short_addr_map_);
}
}
void SensorScheduler::CleanIdleOccupiedSet(long ts) {
if (free_slice_ocuppied_.size() > 5) {
for (auto it = free_slice_ocuppied_.begin(); it != free_slice_ocuppied_.end();) {
if ((*it) < ts) {
it = free_slice_ocuppied_.erase(it);
} else ++it;
}
}
}