|
|
|
|
@ -732,8 +732,12 @@ static void REF_StateMachine(void) { |
|
|
|
|
static void ReflTask(void *pvParameters) { |
|
|
|
|
(void)pvParameters; /* not used */ |
|
|
|
|
for(;;) { |
|
|
|
|
REF_StateMachine(); |
|
|
|
|
vTaskDelay(5/portTICK_PERIOD_MS); |
|
|
|
|
if (REF_Sensor.isEnabled) { |
|
|
|
|
REF_StateMachine(); |
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(5)); |
|
|
|
|
} else { |
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(100)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -750,7 +754,7 @@ void REF_Init(void) { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
REF_Sensor.isEnabled = true; |
|
|
|
|
REF_Sensor.savePower = true; |
|
|
|
|
REF_Sensor.savePower = false; /* turn off, as this extends the ref sensor task time by around 200 us */ |
|
|
|
|
McuGPIO_GetDefaultConfig(&gpioConfig); |
|
|
|
|
/* IR on/off: PTD1, high active */ |
|
|
|
|
gpioConfig.hw.gpio = GPIOD; |
|
|
|
|
|