1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

add SERVO_CONFIG to backup file, restoring old version will throw compatibility error

This commit is contained in:
cTn 2014-10-06 15:24:34 +02:00
parent 2c9fafe4b1
commit cd4c7a8160
4 changed files with 64 additions and 42 deletions

View file

@ -671,6 +671,20 @@ MSP.crunch = function (code) {
buffer.push(MISC.vbatmaxcellvoltage);
buffer.push(MISC.placeholder3);
break;
case MSP_codes.MSP_SET_SERVO_CONF:
for (var i = 0; i < SERVO_CONFIG.length; i++) {
buffer.push(lowByte(SERVO_CONFIG[i].min));
buffer.push(highByte(SERVO_CONFIG[i].min));
buffer.push(lowByte(SERVO_CONFIG[i].max));
buffer.push(highByte(SERVO_CONFIG[i].max));
buffer.push(lowByte(SERVO_CONFIG[i].middle));
buffer.push(highByte(SERVO_CONFIG[i].middle));
buffer.push(lowByte(SERVO_CONFIG[i].rate));
}
break;
default:
return false;