1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

OP-125 Flight: Changed GPS stack size to a bit closer to what the internal model needs to get rid of out of memory warning, but it could still use 1k less if it pulled all the constants from flash when needed and computed the time difference when called. Also changed ManualControl so it checks the active control values to determine the warning, so if GCS is controlling the warning light goes out.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1387 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-08-23 06:03:19 +00:00 committed by peabody124
parent 82f7f42112
commit 2db294caf7
2 changed files with 9 additions and 9 deletions

View File

@ -80,7 +80,7 @@ void nmeaProcessGPGSA(char* packet);
// Private constants
// Unfortunately need a good size stack for the WMM calculation
#define STACK_SIZE configMINIMAL_STACK_SIZE+3500
#define STACK_SIZE configMINIMAL_STACK_SIZE + 2000
#define TASK_PRIORITY (tskIDLE_PRIORITY + 3)
// Private types

View File

@ -154,6 +154,13 @@ static void manualControlTask(void* parameters)
cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_STABILIZED;
}
// Update the ManualControlCommand object
ManualControlCommandSet(&cmd);
// This seems silly to set then get, but the reason is if the GCS is
// the control input, the set command will be blocked by the read only
// setting and the get command will pull the right values from telemetry
ManualControlCommandGet(&cmd);
// Check for connection status (negative throttle values)
// The receiver failsafe for the throttle channel should be set to a value below the channel NEUTRAL
if ( cmd.Throttle < THROTTLE_FAILSAFE )
@ -171,14 +178,7 @@ static void manualControlTask(void* parameters)
cmd.Throttle = 0;
}
}
// Update the ManualControlCommand object
ManualControlCommandSet(&cmd);
// This seems silly to set then get, but the reason is if the GCS is
// the control input, the set command will be blocked by the read only
// setting and the get command will pull the right values from telemetry
ManualControlCommandGet(&cmd);
// Depending on the mode update the Stabilization or Actuator objects
if ( cmd.FlightMode == MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL )
{