mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
Flight/System: Double heart rate when system is armed. This is per request in
IRC, but suggestions are welcome. In the long run we probably need a sensible way of embedding some information in the LED but it's not obvious to me. Also could have done with callback - sue me. ;) git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1997 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
cd04845c3d
commit
098b2fd693
@ -41,6 +41,7 @@
|
||||
#include "openpilot.h"
|
||||
#include "systemmod.h"
|
||||
#include "objectpersistence.h"
|
||||
#include "manualcontrolcommand.h"
|
||||
#include "systemstats.h"
|
||||
|
||||
// Private constants
|
||||
@ -119,8 +120,15 @@ static void systemTask(void *parameters)
|
||||
PIOS_LED_Off(LED2);
|
||||
}
|
||||
|
||||
ManualControlCommandData manualControlCommandData;
|
||||
ManualControlCommandGet(&manualControlCommandData);
|
||||
|
||||
// Wait until next period
|
||||
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
||||
if(manualControlCommandData.Armed == MANUALCONTROLCOMMAND_ARMED_TRUE) {
|
||||
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS / 2);
|
||||
} else {
|
||||
vTaskDelayUntil(&lastSysTime, SYSTEM_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user