Skip to content

Commit

Permalink
ardupilot: Populate array of available generic variables with the `NA…
Browse files Browse the repository at this point in the history
…MED_VALUE_FLOATs`
  • Loading branch information
rafaellehmkuhl authored and ArturoManzoli committed Jun 7, 2024
1 parent 76c4601 commit 64e5084
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/vehicle/ardupilot/ardupilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ export abstract class ArduPilotVehicle<Modes> extends Vehicle.AbstractVehicle<Mo
case MAVLinkType.NAMED_VALUE_FLOAT: {
const namedValueFloatMessage = mavlink_message.message as Message.NamedValueFloat
const messageName = namedValueFloatMessage.name.join('').replaceAll('\x00', '')
if (!this._availableGenericVariablesdMessagePaths.includes(messageName)) {
this._availableGenericVariablesdMessagePaths.push(messageName)
}
this._genericVariables[messageName] = namedValueFloatMessage.value
this.onGenericVariables.emit()
break
Expand Down

0 comments on commit 64e5084

Please sign in to comment.