Skip to content

Commit

Permalink
GCSViews: ConfigRawParams: look up param type for bitmask helper
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 authored and meee1 committed Oct 2, 2023
1 parent ad7485a commit bad4370
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion GCSViews/ConfigurationView/ConfigRawParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,16 @@ private void Params_RowEnter(object sender, DataGridViewCellEventArgs e)
{
var mcb = new MavlinkCheckBoxBitMask();
var list = new MAVLink.MAVLinkParamList();
// Try and get type so the correct bitmask to value convertion is done
var type = MAVLink.MAV_PARAM_TYPE.INT32;
if (MainV2.comPort.MAV.param.ContainsKey(param_name))
{
type = MainV2.comPort.MAV.param[param_name].TypeAP;
}
list.Add(new MAVLink.MAVLinkParam(param_name, double.Parse(Params[Value.Index, e.RowIndex].Value.ToString(), CultureInfo.InvariantCulture),
MAVLink.MAV_PARAM_TYPE.INT32));
type));
mcb.setup(param_name, list);
mcb.ValueChanged += (o, x, value) =>
{
Expand Down

0 comments on commit bad4370

Please sign in to comment.