Skip to content

Commit

Permalink
Merge pull request mavlink#1734 from DonLakeFlyer/APMParamFix
Browse files Browse the repository at this point in the history
Fix APM type conversion
  • Loading branch information
DonLakeFlyer committed Jul 23, 2015
2 parents ca32695 + 588218b commit a9c1cfe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/uas/UAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2221,17 +2221,17 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,

case MAV_PARAM_TYPE_UINT8:
if (getAutopilotType() == MAV_AUTOPILOT_ARDUPILOTMEGA) {
paramValue = QVariant(QChar((unsigned char)paramUnion.param_float));
paramValue = QVariant((unsigned short)paramUnion.param_float);
} else {
paramValue = QVariant(QChar((unsigned char)paramUnion.param_uint8));
paramValue = QVariant(paramUnion.param_uint8);
}
break;

case MAV_PARAM_TYPE_INT8:
if (getAutopilotType() == MAV_AUTOPILOT_ARDUPILOTMEGA) {
paramValue = QVariant(QChar((char)paramUnion.param_float));
paramValue = QVariant((short)paramUnion.param_float);
} else {
paramValue = QVariant(QChar((char)paramUnion.param_int8));
paramValue = QVariant(paramUnion.param_int8);
}
break;

Expand Down

0 comments on commit a9c1cfe

Please sign in to comment.