minor changes
This commit is contained in:
parent
a9ec21df04
commit
43200ab700
|
@ -593,7 +593,9 @@ static void OnRxData(LmHandlerAppData_t *appData, LmHandlerRxParams_t *params)
|
||||||
|
|
||||||
|
|
||||||
typedef struct service_period_per_day {
|
typedef struct service_period_per_day {
|
||||||
uint8_t enable; // enable this time slot or not
|
uint8_t enable_mask; // enable this time slot or not day of week,
|
||||||
|
// 0x1f= 0b0001 1111 ---> day1 to day5 of week
|
||||||
|
// 0x60= 0b0110 0000 ---> day6 5o day 7 of week
|
||||||
uint8_t start_hour; // start hour 00--23 in 24hour
|
uint8_t start_hour; // start hour 00--23 in 24hour
|
||||||
uint8_t start_minute; // start minute 00--59
|
uint8_t start_minute; // start minute 00--59
|
||||||
uint8_t end_hour; // end hour 00-23 in 24 hour
|
uint8_t end_hour; // end hour 00-23 in 24 hour
|
||||||
|
@ -619,7 +621,7 @@ static void STS_Check_Service_Period(void)
|
||||||
|
|
||||||
for (uint8_t i=0; i<4; i++)
|
for (uint8_t i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
if (rc_service_period[i].enable)
|
if (rc_service_period[i].enable_mask)
|
||||||
{
|
{
|
||||||
if ((time_now.tm_hour >= rc_service_period[i].start_hour) && (time_now.tm_hour < rc_service_period[i].end_hour))
|
if ((time_now.tm_hour >= rc_service_period[i].start_hour) && (time_now.tm_hour < rc_service_period[i].end_hour))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue