mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 17:25:14 +03:00
Merge pull request #1367 from breadoven/abo_fix_mission_eeprom_data_transfer
Mission control eeprom data transfer fix
This commit is contained in:
commit
f35804c4c3
1 changed files with 10 additions and 13 deletions
|
@ -2009,7 +2009,6 @@ TABS.mission_control.initialize = function (callback) {
|
||||||
$('#loadEepromMissionButton').on('click', function () {
|
$('#loadEepromMissionButton').on('click', function () {
|
||||||
if (markers.length && !confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) return;
|
if (markers.length && !confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) return;
|
||||||
removeAllWaypoints();
|
removeAllWaypoints();
|
||||||
GUI.log(chrome.i18n.getMessage('eeprom_load_ok'));
|
|
||||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_LOAD, [0], getWaypointsFromFC);
|
MSP.send_message(MSPCodes.MSP_WP_MISSION_LOAD, [0], getWaypointsFromFC);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2017,12 +2016,6 @@ TABS.mission_control.initialize = function (callback) {
|
||||||
$(this).addClass('disabled');
|
$(this).addClass('disabled');
|
||||||
GUI.log('Start send point');
|
GUI.log('Start send point');
|
||||||
sendWaypointsToFC();
|
sendWaypointsToFC();
|
||||||
GUI.log('End send point');
|
|
||||||
$('#saveEepromMissionButton').removeClass('disabled');
|
|
||||||
GUI.log(chrome.i18n.getMessage('eeprom_saved_ok'));
|
|
||||||
setTimeout(function(){
|
|
||||||
MSP.send_message(MSPCodes.MSP_WP_MISSION_SAVE, [0], false);
|
|
||||||
},2000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
@ -2227,8 +2220,8 @@ TABS.mission_control.initialize = function (callback) {
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
function getWaypointsFromFC() {
|
function getWaypointsFromFC() {
|
||||||
mspHelper.loadWaypoints();
|
mspHelper.loadWaypoints(function() {
|
||||||
setTimeout(function(){
|
GUI.log(chrome.i18n.getMessage('eeprom_load_ok'));
|
||||||
mission.reinit();
|
mission.reinit();
|
||||||
mission.copy(MISSION_PLANER);
|
mission.copy(MISSION_PLANER);
|
||||||
mission.update(true);
|
mission.update(true);
|
||||||
|
@ -2237,15 +2230,19 @@ TABS.mission_control.initialize = function (callback) {
|
||||||
map.getView().setZoom(16);
|
map.getView().setZoom(16);
|
||||||
redrawLayers();
|
redrawLayers();
|
||||||
updateTotalInfo();
|
updateTotalInfo();
|
||||||
}, 2000);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendWaypointsToFC() {
|
function sendWaypointsToFC() {
|
||||||
MISSION_PLANER.reinit();
|
MISSION_PLANER.reinit();
|
||||||
MISSION_PLANER.copy(mission);
|
MISSION_PLANER.copy(mission);
|
||||||
MISSION_PLANER.update(true, true);
|
MISSION_PLANER.update(true, true);
|
||||||
mspHelper.saveWaypoints();
|
mspHelper.saveWaypoints(function() {
|
||||||
setTimeout(function(){
|
GUI.log('End send point');
|
||||||
|
$('#saveEepromMissionButton').removeClass('disabled');
|
||||||
|
GUI.log(chrome.i18n.getMessage('eeprom_saved_ok'));
|
||||||
|
MSP.send_message(MSPCodes.MSP_WP_MISSION_SAVE, [0], false);
|
||||||
|
|
||||||
mission.setMaxWaypoints(MISSION_PLANER.getMaxWaypoints());
|
mission.setMaxWaypoints(MISSION_PLANER.getMaxWaypoints());
|
||||||
mission.setValidMission(MISSION_PLANER.getValidMission());
|
mission.setValidMission(MISSION_PLANER.getValidMission());
|
||||||
mission.setCountBusyPoints(MISSION_PLANER.getCountBusyPoints());
|
mission.setCountBusyPoints(MISSION_PLANER.getCountBusyPoints());
|
||||||
|
@ -2256,7 +2253,7 @@ TABS.mission_control.initialize = function (callback) {
|
||||||
cleanLayers();
|
cleanLayers();
|
||||||
redrawLayers();
|
redrawLayers();
|
||||||
$('#MPeditPoint').fadeOut(300);
|
$('#MPeditPoint').fadeOut(300);
|
||||||
}, 2000);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue