from ADIS_HS2022: reducing reflectance task time

main
Jonas Arnold 4 years ago
parent 81db14c00c
commit 77bd5c3349
  1. 10
      ADIS_Sumo_Styger/Sumo/Reflectance.c

@ -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;

Loading…
Cancel
Save