diff --git a/flight/OpenPilot/Modules/GPS/GPS.c b/flight/OpenPilot/Modules/GPS/GPS.c index fcab8182e..b22c05449 100644 --- a/flight/OpenPilot/Modules/GPS/GPS.c +++ b/flight/OpenPilot/Modules/GPS/GPS.c @@ -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 diff --git a/flight/OpenPilot/Modules/ManualControl/manualcontrol.c b/flight/OpenPilot/Modules/ManualControl/manualcontrol.c index 9548f83db..5d89600ba 100644 --- a/flight/OpenPilot/Modules/ManualControl/manualcontrol.c +++ b/flight/OpenPilot/Modules/ManualControl/manualcontrol.c @@ -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 ) {