1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1012 fixed speeds to make easy to distinguish flash rates

This commit is contained in:
Alessio Morale 2013-06-15 17:27:48 +02:00
parent f2431b2868
commit 517c331dd4

View File

@ -204,7 +204,7 @@ static void systemTask(__attribute__((unused)) void *parameters)
while (1) {
// Update the system statistics
updateStats();
cycleCount = cycleCount > 0 ? cycleCount - 1 : 3;
cycleCount = cycleCount > 0 ? cycleCount - 1 : 7;
// Update the system alarms
updateSystemAlarms();
@ -224,7 +224,7 @@ static void systemTask(__attribute__((unused)) void *parameters)
uint8_t armingStatus;
FlightStatusArmedGet(&armingStatus);
if ((armingStatus == FLIGHTSTATUS_ARMED_ARMED && (cycleCount & 0x1)) ||
(armingStatus != FLIGHTSTATUS_ARMED_ARMED && (cycleCount & 0x2))) {
(armingStatus != FLIGHTSTATUS_ARMED_ARMED && (cycleCount & 0x4))) {
PIOS_LED_On(PIOS_LED_HEARTBEAT);
} else {
PIOS_LED_Off(PIOS_LED_HEARTBEAT);
@ -238,7 +238,7 @@ static void systemTask(__attribute__((unused)) void *parameters)
if (AlarmsHasCritical()) {
PIOS_LED_On(PIOS_LED_ALARM);
} else if( (AlarmsHasErrors() && (cycleCount & 0x1)) ||
(!AlarmsHasErrors() && AlarmsHasWarnings() && (cycleCount & 0x2))){
(!AlarmsHasErrors() && AlarmsHasWarnings() && (cycleCount & 0x4))){
PIOS_LED_On(PIOS_LED_ALARM);
} else {
PIOS_LED_Off(PIOS_LED_ALARM);
@ -247,7 +247,7 @@ static void systemTask(__attribute__((unused)) void *parameters)
UAVObjEvent ev;
int delayTime = SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS / (LED_BLINK_RATE_HZ);
int delayTime = SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS / (LED_BLINK_RATE_HZ * 2);
if (xQueueReceive(objectPersistenceQueue, &ev, delayTime) == pdTRUE) {
// If object persistence is updated call the callback