1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 11:59:51 +03:00

Basic changes to display timers on mixer screen

Still thinking about how to handle individual timer overriding.

Full overridie table can be quite long
This commit is contained in:
Marcelo Bezerra 2023-09-02 12:53:07 +02:00
parent b2658db108
commit 96ec2da3ce
5 changed files with 49 additions and 20 deletions

View file

@ -1482,9 +1482,26 @@ var mspHelper = (function (gui) {
case MSPCodes.MSPV2_INAV_OUTPUT_MAPPING:
OUTPUT_MAPPING.flush();
for (i = 0; i < data.byteLength; ++i)
OUTPUT_MAPPING.put(data.getUint8(i));
OUTPUT_MAPPING.put({
'timerId': i,
'usageFlags': data.getUint8(i)});
break;
case MSPCodes.MSPV2_INAV_OUTPUT_MAPPING_EXT:
OUTPUT_MAPPING.flush();
for (i = 0; i < data.byteLength; i += 2) {
timerId = data.getUint8(i);
usageFlags = data.getUint8(i + 1);
OUTPUT_MAPPING.put(
{
'timerId': timerId,
'usageFlags': usageFlags
});
}
break;
case MSPCodes.MSP2_INAV_MC_BRAKING:
try {
BRAKING_CONFIG.speedThreshold = data.getUint16(0, true);
@ -2820,6 +2837,10 @@ var mspHelper = (function (gui) {
MSP.send_message(MSPCodes.MSPV2_INAV_OUTPUT_MAPPING, false, false, callback);
};
self.loadOutputMappingExt = function (callback) {
MSP.send_message(MSPCodes.MSPV2_INAV_OUTPUT_MAPPING_EXT, false, false, callback);
};
self.loadBatteryConfig = function (callback) {
MSP.send_message(MSPCodes.MSPV2_BATTERY_CONFIG, false, false, callback);
};