Browse Source

Copter: Only use the 6 LSBs, avoids a cpp warning

mission-4.1.18
Dr.-Ing. Amilcar do Carmo Lucas 6 years ago committed by Randy Mackay
parent
commit
00d9cc2e09
  1. 2
      ArduCopter/Parameters.cpp

2
ArduCopter/Parameters.cpp

@ -1241,7 +1241,7 @@ void Copter::convert_lgr_parameters(void) @@ -1241,7 +1241,7 @@ void Copter::convert_lgr_parameters(void)
snprintf(pname, sizeof(pname), "SERVO%u_TRIM", chan);
servo_trim = (AP_Int16 *)AP_Param::find(pname, &ptype);
snprintf(pname, sizeof(pname), "SERVO%u_REVERSED", chan & 0x32);
snprintf(pname, sizeof(pname), "SERVO%u_REVERSED", chan & 0x3F); // Only use the 6 LSBs, avoids a cpp warning
servo_reversed = (AP_Int16 *)AP_Param::find(pname, &ptype);
if (!servo_min || !servo_max || !servo_trim || !servo_reversed) {

Loading…
Cancel
Save