diff --git a/common/global.hpp b/common/global.hpp index f8b3ec6..ad8569c 100644 --- a/common/global.hpp +++ b/common/global.hpp @@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus { //#define NR5G_MODULE -//#define Q4G_MODULE +#define Q4G_MODULE //#define WIFI_MODULE //#define NR5G_MEIGE diff --git a/platform/platform_init.cpp b/platform/platform_init.cpp index 6b20a21..69caf53 100644 --- a/platform/platform_init.cpp +++ b/platform/platform_init.cpp @@ -14,7 +14,7 @@ int GlobalConfig::LinkStatus_G = 0; int GlobalConfig::LinkCount = 0; int GlobalConfig::net0Status = 1; -std::string GlobalConfig::Version = "5.6.2"; +std::string GlobalConfig::Version = "5.6.3"; std::string GlobalConfig::MacAddr_G = ""; std::string GlobalConfig::MacAddr_G2 = ""; std::string GlobalConfig::IpAddr_G = ""; diff --git a/scheduler/schedule.cpp b/scheduler/schedule.cpp index 687a121..80be797 100644 --- a/scheduler/schedule.cpp +++ b/scheduler/schedule.cpp @@ -159,6 +159,13 @@ int SensorScheduler::StartSchedule(int short_addr, int &next_duration) { // wrong time to come long available_ts = current_wave_start_ts_ + (nth_eigen_value_slice_ + 1) * eigen_value_send_interval_ + (id - 1) * eigen_value_send_duration_; next_duration = available_ts - current_ts_; + if (next_duration < 0 || next_duration > eigen_value_send_interval_) { + zlog_warn(zct, "[Nxt] exception duration: %d", next_duration); + next_duration = eigen_value_send_interval_; + }else if (next_duration < 15){ + zlog_warn(zct, "[Nxt] exception duration: %d", next_duration); + next_duration = 15; // 最小15秒 + } zlog_warn(zct, "[%d:%x] wrong time in wave slice, next feature send utc time:[%s], duration:%d", id, short_addr, GetUTCTime(available_ts).c_str(), next_duration); return kScheduleWrongTime; }