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

OP-1009 fix comments and fixes review

+review OPReview-516
This commit is contained in:
Alessio Morale 2013-06-17 21:01:24 +02:00
parent d5a77fb525
commit b012d55f26
2 changed files with 5 additions and 4 deletions

View File

@ -412,7 +412,8 @@ static int32_t updateAttitudeComplementary(bool first_run)
if ((xTaskGetTickCount() - initStartupTime < CALIBRATION_DURATION + CALIBRATION_DELAY) &&
(xTaskGetTickCount() - initStartupTime > CALIBRATION_DELAY)) {
// For first 7 seconds use accels to get gyro bias
// For first CALIBRATION_DURATION seconds after CALIBRATION_DELAY from startup
// Zero gyro bias assuming it is steady, smoothing the gyro input value applying rollPitchBiasRate.
attitudeSettings.AccelKp = 1.0f;
attitudeSettings.AccelKi = 0.0f;
attitudeSettings.YawBiasRate = 0.23f;

View File

@ -167,7 +167,7 @@ static void systemTask(__attribute__((unused)) void *parameters)
{
/* start the delayed callback scheduler */
CallbackSchedulerStart();
static uint8_t cycleCount;
uint8_t cycleCount;
/* create all modules thread */
MODULE_TASKCREATE_ALL;
@ -237,8 +237,8 @@ static void systemTask(__attribute__((unused)) void *parameters)
#if defined(PIOS_LED_ALARM)
if (AlarmsHasCritical()) {
PIOS_LED_On(PIOS_LED_ALARM);
} else if( (AlarmsHasErrors() && (cycleCount & 0x1)) ||
(!AlarmsHasErrors() && AlarmsHasWarnings() && (cycleCount & 0x4))){
} else if ((AlarmsHasErrors() && (cycleCount & 0x1)) ||
(!AlarmsHasErrors() && AlarmsHasWarnings() && (cycleCount & 0x4))) {
PIOS_LED_On(PIOS_LED_ALARM);
} else {
PIOS_LED_Off(PIOS_LED_ALARM);