From 5b00aed6421158f29c6a2d7289e2ff3400d45502 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Fri, 17 Nov 2023 10:14:49 -0300 Subject: [PATCH 1/3] Allow usage with Ground Rover vehicles --- src/libs/vehicle/vehicle-factory.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/vehicle/vehicle-factory.ts b/src/libs/vehicle/vehicle-factory.ts index b160a11bf..3875b7062 100644 --- a/src/libs/vehicle/vehicle-factory.ts +++ b/src/libs/vehicle/vehicle-factory.ts @@ -106,6 +106,7 @@ function createVehicleFromMessage(message: Uint8Array): void { case MavType.MAV_TYPE_SUBMARINE: VehicleFactory.createVehicle(Vehicle.Firmware.ArduPilot, Vehicle.Type.Sub) break + case MavType.MAV_TYPE_GROUND_ROVER: case MavType.MAV_TYPE_SURFACE_BOAT: VehicleFactory.createVehicle(Vehicle.Firmware.ArduPilot, Vehicle.Type.Rover) break From 3058eedf926b6b437d6fb949d93e90cfec7627ff Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Fri, 17 Nov 2023 10:24:43 -0300 Subject: [PATCH 2/3] Allow usage with Plane-like vehicles --- src/libs/vehicle/vehicle-factory.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/vehicle/vehicle-factory.ts b/src/libs/vehicle/vehicle-factory.ts index 3875b7062..5fe3384d2 100644 --- a/src/libs/vehicle/vehicle-factory.ts +++ b/src/libs/vehicle/vehicle-factory.ts @@ -110,6 +110,13 @@ function createVehicleFromMessage(message: Uint8Array): void { case MavType.MAV_TYPE_SURFACE_BOAT: VehicleFactory.createVehicle(Vehicle.Firmware.ArduPilot, Vehicle.Type.Rover) break + case MavType.MAV_TYPE_FLAPPING_WING: + case MavType.MAV_TYPE_VTOL_TILTROTOR: + case MavType.MAV_TYPE_VTOL_QUADROTOR: + case MavType.MAV_TYPE_VTOL_DUOROTOR: + case MavType.MAV_TYPE_FIXED_WING: + VehicleFactory.createVehicle(Vehicle.Firmware.ArduPilot, Vehicle.Type.Plane) + break default: console.warn(`Vehicle type not supported: ${system_id}/${component_id}: ${heartbeat.mavtype.type}`) } From b6efb19494749d6881919d29472642f3574df097 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Fri, 17 Nov 2023 10:24:51 -0300 Subject: [PATCH 3/3] Allow usage with Copter-like vehicles --- src/libs/vehicle/vehicle-factory.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libs/vehicle/vehicle-factory.ts b/src/libs/vehicle/vehicle-factory.ts index 5fe3384d2..f3534a860 100644 --- a/src/libs/vehicle/vehicle-factory.ts +++ b/src/libs/vehicle/vehicle-factory.ts @@ -117,6 +117,15 @@ function createVehicleFromMessage(message: Uint8Array): void { case MavType.MAV_TYPE_FIXED_WING: VehicleFactory.createVehicle(Vehicle.Firmware.ArduPilot, Vehicle.Type.Plane) break + case MavType.MAV_TYPE_TRICOPTER: + case MavType.MAV_TYPE_COAXIAL: + case MavType.MAV_TYPE_HEXAROTOR: + case MavType.MAV_TYPE_HELICOPTER: + case MavType.MAV_TYPE_OCTOROTOR: + case MavType.MAV_TYPE_DODECAROTOR: + case MavType.MAV_TYPE_QUADROTOR: + VehicleFactory.createVehicle(Vehicle.Firmware.ArduPilot, Vehicle.Type.Copter) + break default: console.warn(`Vehicle type not supported: ${system_id}/${component_id}: ${heartbeat.mavtype.type}`) }