Browse Source

SITL: fixed segv in SITL RCProtocolTest

c415-sdk
Andrew Tridgell 5 years ago
parent
commit
6218537ff7
  1. 2
      libraries/SITL/SIM_Aircraft.cpp

2
libraries/SITL/SIM_Aircraft.cpp

@ -75,7 +75,7 @@ Aircraft::Aircraft(const char *frame_str) : @@ -75,7 +75,7 @@ Aircraft::Aircraft(const char *frame_str) :
enum ap_var_type ptype;
ahrs_orientation = (AP_Int8 *)AP_Param::find("AHRS_ORIENTATION", &ptype);
enum Rotation imu_rotation = (enum Rotation)ahrs_orientation->get();
enum Rotation imu_rotation = ahrs_orientation?(enum Rotation)ahrs_orientation->get():ROTATION_NONE;
ahrs_rotation_inv.from_rotation(imu_rotation);
ahrs_rotation_inv.transpose();
last_imu_rotation = imu_rotation;

Loading…
Cancel
Save