mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
Fix profile change not working
Initially, I thought that the profiles were not changing when you selected a new profile from the select box. It turns out that this was only happening after setting up from the defaults dialog. The problem was that the `periodicStatusUpdater` was being stopped to perform the parameter upload. But not re-started. I added a function to resume the updater, and everything works as it should. I made a few other changes: - Tidied up the setting of the parameters for each profile - Added specific `set` profile messages, rather than `loaded` being repeated - Only show messages for the profiles that have changed, not all of them
This commit is contained in:
parent
45e7e41b96
commit
c0e02494f6
7 changed files with 60 additions and 64 deletions
|
@ -532,7 +532,7 @@ $(function() {
|
|||
mixerprofile_e.on('change', function () {
|
||||
var mixerprofile = parseInt($(this).val());
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_MIXER_PROFILE, [mixerprofile], false, function () {
|
||||
GUI.log(i18n.getMessage('loadedMixerProfile', [mixerprofile + 1]));
|
||||
GUI.log(i18n.getMessage('setMixerProfile', [mixerprofile + 1]));
|
||||
MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, function () {
|
||||
GUI.log(i18n.getMessage('deviceRebooting'));
|
||||
GUI.handleReconnect();
|
||||
|
@ -545,7 +545,7 @@ $(function() {
|
|||
profile_e.on('change', function () {
|
||||
var profile = parseInt($(this).val());
|
||||
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [profile], false, function () {
|
||||
GUI.log(i18n.getMessage('pidTuning_LoadedProfile', [profile + 1]));
|
||||
GUI.log(i18n.getMessage('setControlProfile', [profile + 1]));
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -554,7 +554,7 @@ $(function() {
|
|||
batteryprofile_e.on('change', function () {
|
||||
var batteryprofile = parseInt($(this).val());
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [batteryprofile], false, function () {
|
||||
GUI.log(i18n.getMessage('loadedBatteryProfile', [batteryprofile + 1]));
|
||||
GUI.log(i18n.getMessage('setBatteryProfile', [batteryprofile + 1]));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue