1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-23 00:05:19 +03:00
This commit is contained in:
Andi Kanzler 2023-11-13 14:02:45 -03:00
parent f443051ffa
commit 412961c5b4
11 changed files with 776 additions and 179 deletions

View file

@ -1567,12 +1567,27 @@ var mspHelper = (function (gui) {
}
break;
case MSPCodes.MSP2_INAV_SAFEHOME:
SAFEHOMES.put(new Safehome(
data.getUint8(0),
let safehome = new Safehome(
data.getUint8(1),
data.getInt32(2, true),
data.getInt32(6, true)
));
data.getInt32(6, true),
data.getInt32(10, true),
data.getInt32(14, true),
data.getUint8(18, true),
data.getInt16(19, true),
data.getInt16(21, true),
data.getUint8(23, true),
data.getUint8(0, true),
);
if (safehome.getEnabled()) {
(async () => {
const elevation = await safehome.getElevationFromServer(globalSettings) * 100;
safehome.setElevation(elevation);
SAFEHOMES.put(safehome);
})();
}
break;
case MSPCodes.MSP2_INAV_SET_SAFEHOME:
console.log('Safehome points saved');