Skip to content

Commit

Permalink
HardwareReport: support new 4.6 GPS param names
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 committed Apr 21, 2024
1 parent 8903043 commit 7777669
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions HardwareReport/HardwareReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,19 @@ function load_gps(log) {
pos: get_param_array(params, pos_names),
node_id: params["GPS_CAN_NODEID" + (i+1)] }
}
continue
}
const new_prefix = "GPS" + (i+1)
const new_type_name = new_prefix + "_TYPE"
if (new_type_name in params) {
// New per-instance params for 4.6+
const type = params[new_type_name]
if (type != 0) {
const pos_names = get_param_name_vector3(new_prefix + "_POS_")
gps[i] = { type: type,
pos: get_param_array(params, pos_names),
node_id: params[new_prefix + "_CAN_NODEID"] }
}
}
}

Expand Down

0 comments on commit 7777669

Please sign in to comment.