Copter: fix snprintf size warning

This commit is contained in:
Pierre Kancir 2018-12-20 09:36:58 +01:00 committed by Randy Mackay
parent 36d908c524
commit 8c5d9d38a6
1 changed files with 1 additions and 1 deletions

View File

@ -1241,7 +1241,7 @@ void Copter::convert_lgr_parameters(void)
snprintf(pname, sizeof(pname), "SERVO%u_TRIM", chan); snprintf(pname, sizeof(pname), "SERVO%u_TRIM", chan);
servo_trim = (AP_Int16 *)AP_Param::find(pname, &ptype); servo_trim = (AP_Int16 *)AP_Param::find(pname, &ptype);
snprintf(pname, sizeof(pname), "SERVO%u_REVERSED", chan); snprintf(pname, sizeof(pname), "SERVO%u_REVERSED", chan & 0x32);
servo_reversed = (AP_Int16 *)AP_Param::find(pname, &ptype); servo_reversed = (AP_Int16 *)AP_Param::find(pname, &ptype);
if (!servo_min || !servo_max || !servo_trim || !servo_reversed) { if (!servo_min || !servo_max || !servo_trim || !servo_reversed) {