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

Merge pull request #124 from mikeller/add_num_profiles_to_msp

Made configurator aware of number of profiles supported by firmware. Made backup / restore more robust.
This commit is contained in:
borisbstyle 2016-07-18 12:18:37 +02:00 committed by GitHub
commit 500ddba518
5 changed files with 27 additions and 12 deletions

View file

@ -296,7 +296,11 @@ var MSP = {
CONFIG.mode = data.getUint32(6, 1);
CONFIG.profile = data.getUint8(10);
CONFIG.cpuload = data.getUint16(11, 1);
CONFIG.numProfiles = data.getUint8(13);
$('select[name="profilechange"]').val(CONFIG.profile);
if (CONFIG.numProfiles === 2) {
$('select[name="profilechange"] .profile3').hide();
}
sensor_status(CONFIG.activeSensors);
$('span.i2c-error').text(CONFIG.i2cError);