mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Change blink rate to Hz rather than 1/2 Hz. As per comments in review OPReview-18.
This commit is contained in:
parent
edd5ad8a78
commit
341dbd7ad9
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
// Private constants
|
// Private constants
|
||||||
#define SYSTEM_UPDATE_PERIOD_MS 1000
|
#define SYSTEM_UPDATE_PERIOD_MS 1000
|
||||||
#define LED_BLINK_RATE 10 // Will give LED rate of 5 Hz
|
#define LED_BLINK_RATE_HZ 5
|
||||||
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 995998 // calibrated by running tests/test_cpuload.c
|
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 995998 // calibrated by running tests/test_cpuload.c
|
||||||
// must be updated if the FreeRTOS or compiler
|
// must be updated if the FreeRTOS or compiler
|
||||||
// optimisation options are changed.
|
// optimisation options are changed.
|
||||||
@ -144,7 +144,7 @@ static void systemTask(void *parameters)
|
|||||||
|
|
||||||
// Wait until next period
|
// Wait until next period
|
||||||
if(manualControlCommandData.Armed == MANUALCONTROLCOMMAND_ARMED_TRUE) {
|
if(manualControlCommandData.Armed == MANUALCONTROLCOMMAND_ARMED_TRUE) {
|
||||||
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS / LED_BLINK_RATE);
|
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS / (LED_BLINK_RATE_HZ * 2) );
|
||||||
} else {
|
} else {
|
||||||
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user