diff --git a/src/libs/blueos.ts b/src/libs/blueos.ts index e05570187..53fcf42a8 100644 --- a/src/libs/blueos.ts +++ b/src/libs/blueos.ts @@ -100,3 +100,16 @@ export const getMavlink2RestVersion = async (vehicleAddress: string): Promise => { + try { + const url = `http://${vehicleAddress}/ardupilot-manager/v1.0/firmware_info` + const ardupilotFirmwareRawInfo: RawArdupilotFirmwareInfo = await ky.get(url, { timeout: 5000 }).json() + return ardupilotFirmwareRawInfo.version + } catch (error) { + throw new Error(`Could not get Ardupilot firmware version. ${error}`) + } +}