1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 21:05:30 +03:00

MSP Multiple GYRO/ACC alignment support

* Make use of 1.41.0 MSP API changes introduced
  https://github.com/betaflight/betaflight/pull/7506
* Not really happy with the elements/css, but opening this up for feedback. I
  can't quite get the select inputs or the text/icons to go where I want :p
This commit is contained in:
AJ Christensen 2019-04-02 17:55:25 +13:00
parent 974e622b73
commit e322ef0795
6 changed files with 141 additions and 27 deletions

View file

@ -536,6 +536,13 @@ MspHelper.prototype.process_data = function(dataHandler) {
SENSOR_ALIGNMENT.align_gyro = data.readU8();
SENSOR_ALIGNMENT.align_acc = data.readU8();
SENSOR_ALIGNMENT.align_mag = data.readU8();
if (semver.gte(CONFIG.apiVersion, '1.41.0')) {
SENSOR_ALIGNMENT.use_multi_gyro = data.readU8();
SENSOR_ALIGNMENT.gyro_to_use = data.readU8();
SENSOR_ALIGNMENT.gyro_1_align = data.readU8();
SENSOR_ALIGNMENT.gyro_2_align = data.readU8();
}
break;
case MSPCodes.MSP_DISPLAYPORT:
break;
@ -1658,6 +1665,11 @@ MspHelper.prototype.crunch = function(code) {
buffer.push8(SENSOR_ALIGNMENT.align_gyro)
.push8(SENSOR_ALIGNMENT.align_acc)
.push8(SENSOR_ALIGNMENT.align_mag);
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
buffer.push8(SENSOR_ALIGNMENT.gyro_to_use)
.push8(SENSOR_ALIGNMENT.gyro_1_align)
.push8(SENSOR_ALIGNMENT.gyro_2_align);
}
break;
case MSPCodes.MSP_SET_ADVANCED_CONFIG:
buffer.push8(PID_ADVANCED_CONFIG.gyro_sync_denom)