Browse Source

Plane: fixed places that assumed mission command IDs are 8 bit

mission-4.1.18
Andrew Tridgell 9 years ago
parent
commit
07168c3db4
  1. 2
      ArduPlane/ArduPlane.cpp
  2. 2
      ArduPlane/Attitude.cpp

2
ArduPlane/ArduPlane.cpp

@ -485,7 +485,7 @@ void Plane::update_GPS_10Hz(void) @@ -485,7 +485,7 @@ void Plane::update_GPS_10Hz(void)
*/
void Plane::handle_auto_mode(void)
{
uint8_t nav_cmd_id;
uint16_t nav_cmd_id;
// we should be either running a mission or RTLing home
if (mission.state() == AP_Mission::MISSION_RUNNING) {

2
ArduPlane/Attitude.cpp

@ -1176,7 +1176,7 @@ bool Plane::allow_reverse_thrust(void) @@ -1176,7 +1176,7 @@ bool Plane::allow_reverse_thrust(void)
switch (control_mode) {
case AUTO:
{
uint8_t nav_cmd = mission.get_current_nav_cmd().id;
uint16_t nav_cmd = mission.get_current_nav_cmd().id;
// never allow reverse thrust during takeoff
if (nav_cmd == MAV_CMD_NAV_TAKEOFF) {

Loading…
Cancel
Save