1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 04:45:20 +03:00

Motor output reordering feature

Fixed Sonar warnings

renaming MOTOR_REMAP to MOTOR_OUTPUT_REORDER<ING>

Sonar warning fix

Code style fixes after the code review

moving styles to css from the motors tab dialog

Dialog size of Androind devices

Raneming MSP_<SET>_MOTOR_OUTPUT_REORDERING to MSP2

removing old styles and js files reference to motor_remap folder

adding FC.* where needed to accomodate new master changes

fixed alphabetical order for FC settings MOTOR_OUTPUT_REORDER

css fix for Android for motor reordering dialog
This commit is contained in:
Ivan Efimov 2020-06-28 03:54:39 -05:00 committed by Ivan Efimov
parent b596c5fc76
commit e4a85ccc2f
13 changed files with 930 additions and 3 deletions

View file

@ -147,6 +147,13 @@ MspHelper.prototype.process_data = function(dataHandler) {
FC.MOTOR_DATA[i] = data.readU16();
}
break;
case MSPCodes.MSP2_MOTOR_OUTPUT_REORDERING:
FC.MOTOR_OUTPUT_ORDER = [];
const arraySize = data.read8();
for (let i = 0; i < arraySize; i++) {
FC.MOTOR_OUTPUT_ORDER[i] = data.readU8();
}
break;
case MSPCodes.MSP_MOTOR_TELEMETRY:
var telemMotorCount = data.readU8();
for (let i = 0; i < telemMotorCount; i++) {
@ -1549,6 +1556,9 @@ MspHelper.prototype.process_data = function(dataHandler) {
case MSPCodes.MSP_SET_RTC:
console.log('Real time clock set');
break;
case MSPCodes.MSP2_SET_MOTOR_OUTPUT_REORDERING:
console.log('Motor output reordering set');
break;
case MSPCodes.MSP_MULTIPLE_MSP:
@ -2249,6 +2259,15 @@ MspHelper.prototype.crunch = function(code) {
break;
case MSPCodes.MSP2_SET_MOTOR_OUTPUT_REORDERING:
buffer.push8(FC.MOTOR_OUTPUT_ORDER.length);
for (let i = 0; i < FC.MOTOR_OUTPUT_ORDER.length; i++) {
buffer.push8(FC.MOTOR_OUTPUT_ORDER[i]);
}
break;
default:
return false;
}