bug fixing
This commit is contained in:
parent
747a2debf2
commit
9e474fe846
|
@ -714,9 +714,9 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
|
|
||||||
bl_motor_state_value NewMotorState = MotorState_Closed;
|
bl_motor_state_value NewMotorState = MotorState_Closed;
|
||||||
bool SendOpen = false;
|
bool SendOpen = false;
|
||||||
for (u32 i = 0; i < MotorOpenTimesCount; i++)
|
for (u32 j = 0; j < MotorOpenTimesCount; j++)
|
||||||
{
|
{
|
||||||
time_range Range = MotorOpenTimes[i];
|
time_range Range = MotorOpenTimes[j];
|
||||||
bool CurrTimeInRange = SystemTimeIsInTimeRange(Context->SystemTime_Current, Range);
|
bool CurrTimeInRange = SystemTimeIsInTimeRange(Context->SystemTime_Current, Range);
|
||||||
if (CurrTimeInRange) {
|
if (CurrTimeInRange) {
|
||||||
NewMotorState = MotorState_Open;
|
NewMotorState = MotorState_Open;
|
||||||
|
@ -729,7 +729,6 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
ShouldSendCurrentState = true;
|
ShouldSendCurrentState = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ShouldSendCurrentState)
|
if (ShouldSendCurrentState)
|
||||||
{
|
{
|
||||||
BLState->LastSendTime = Context->SystemTime_Current;
|
BLState->LastSendTime = Context->SystemTime_Current;
|
||||||
|
|
Loading…
Reference in New Issue