bug fixing

This commit is contained in:
PS 2021-09-26 16:31:55 -05:00
parent 747a2debf2
commit 9e474fe846
1 changed files with 35 additions and 36 deletions

View File

@ -714,9 +714,9 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
bl_motor_state_value NewMotorState = MotorState_Closed;
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);
if (CurrTimeInRange) {
NewMotorState = MotorState_Open;
@ -729,7 +729,6 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
ShouldSendCurrentState = true;
}
if (ShouldSendCurrentState)
{
BLState->LastSendTime = Context->SystemTime_Current;