1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Update Stat LED blink rate when armed to 5 Hz from its current 1 Hz. This allows a more drastic change in LED behavior to highlight that the aircraft WILL NOW CUT YOUR FINGER OFF IF YOU DON'T RESPECT IT!!

This commit is contained in:
David Buzz Carlson 2011-04-30 01:56:52 -07:00 committed by David Carlson
parent c93ab7e723
commit edd5ad8a78

View File

@ -51,9 +51,11 @@
// Private constants
#define SYSTEM_UPDATE_PERIOD_MS 1000
#define LED_BLINK_RATE 10 // Will give LED rate of 5 Hz
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 995998 // calibrated by running tests/test_cpuload.c
// must be updated if the FreeRTOS or compiler
// optimisation options are changed.
#if defined(PIOS_MANUAL_STACK_SIZE)
#define STACK_SIZE_BYTES PIOS_MANUAL_STACK_SIZE
#else
@ -142,7 +144,7 @@ static void systemTask(void *parameters)
// Wait until next period
if(manualControlCommandData.Armed == MANUALCONTROLCOMMAND_ARMED_TRUE) {
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS / 2);
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS / LED_BLINK_RATE);
} else {
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS);
}