mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-20 06:45:11 +03:00
MSP_STATUS removed from manual pulls
This commit is contained in:
parent
d1693cea2a
commit
3f196a9505
16 changed files with 37 additions and 83 deletions
|
@ -500,12 +500,16 @@ function update_live_status() {
|
||||||
});
|
});
|
||||||
|
|
||||||
//FIXME probably this is a duplication on status polling... one of those is probably very very not needed
|
//FIXME probably this is a duplication on status polling... one of those is probably very very not needed
|
||||||
|
//FIXME MSP_SENSOR_STATUS has to be added here!!
|
||||||
if (GUI.active_tab != 'cli') {
|
if (GUI.active_tab != 'cli') {
|
||||||
MSP.send_message(MSPCodes.MSP_BOXNAMES, false, false);
|
MSP.send_message(MSPCodes.MSP_BOXNAMES, false, false);
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.2.0"))
|
|
||||||
|
if (semver.gte(CONFIG.flightControllerVersion, "1.2.0")) {
|
||||||
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false);
|
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false);
|
||||||
else
|
} else {
|
||||||
MSP.send_message(MSPCodes.MSP_STATUS, false, false);
|
MSP.send_message(MSPCodes.MSP_STATUS, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_ANALOG, false, false);
|
MSP.send_message(MSPCodes.MSP_ANALOG, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -271,8 +271,6 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
// enable data pulling
|
// enable data pulling
|
||||||
helper.interval.add('aux_data_pull', get_rc_data, 50);
|
helper.interval.add('aux_data_pull', get_rc_data, 50);
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -290,8 +290,6 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
// enable data pulling
|
// enable data pulling
|
||||||
helper.interval.add('aux_data_pull', get_rc_data, 50);
|
helper.interval.add('aux_data_pull', get_rc_data, 50);
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -632,9 +632,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
saveChainer.execute();
|
saveChainer.execute();
|
||||||
});
|
});
|
||||||
|
|
||||||
// status data pulled via separate timer with static speed
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
helper.interval.add('config_load_analog', function () {
|
helper.interval.add('config_load_analog', function () {
|
||||||
$('#batteryvoltage').val([ANALOG.voltage.toFixed(1)]);
|
$('#batteryvoltage').val([ANALOG.voltage.toFixed(1)]);
|
||||||
$('#batterycurrent').val([ANALOG.amperage.toFixed(2)]);
|
$('#batterycurrent').val([ANALOG.amperage.toFixed(2)]);
|
||||||
|
|
|
@ -358,8 +358,6 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ TABS.gps.initialize = function (callback) {
|
||||||
$('#content').load("./tabs/gps.html", process_html);
|
$('#content').load("./tabs/gps.html", process_html);
|
||||||
}
|
}
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_STATUS, false, false, load_html);
|
load_html();
|
||||||
|
|
||||||
function set_online(){
|
function set_online(){
|
||||||
$('#connect').hide();
|
$('#connect').hide();
|
||||||
|
@ -111,8 +111,6 @@ TABS.gps.initialize = function (callback) {
|
||||||
get_raw_gps_data();
|
get_raw_gps_data();
|
||||||
}, 75, true);
|
}, 75, true);
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
//check for internet connection on load
|
//check for internet connection on load
|
||||||
if (navigator.onLine) {
|
if (navigator.onLine) {
|
||||||
console.log('Online');
|
console.log('Online');
|
||||||
|
|
|
@ -144,8 +144,6 @@ TABS.modes.initialize = function (callback) {
|
||||||
// enable data pulling
|
// enable data pulling
|
||||||
helper.interval.add('aux_data_pull', get_rc_data, 50);
|
helper.interval.add('aux_data_pull', get_rc_data, 50);
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,10 +19,6 @@ TABS.motors.initialize = function (callback) {
|
||||||
googleAnalytics.sendAppView('Motors');
|
googleAnalytics.sendAppView('Motors');
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_arm_status() {
|
|
||||||
MSP.send_message(MSPCodes.MSP_STATUS, false, false, load_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
function load_config() {
|
function load_config() {
|
||||||
MSP.send_message(MSPCodes.MSP_BF_CONFIG, false, false, load_3d);
|
MSP.send_message(MSPCodes.MSP_BF_CONFIG, false, false, load_3d);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +36,7 @@ TABS.motors.initialize = function (callback) {
|
||||||
$('#content').load("./tabs/motors.html", process_html);
|
$('#content').load("./tabs/motors.html", process_html);
|
||||||
}
|
}
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_MISC, false, false, get_arm_status);
|
MSP.send_message(MSPCodes.MSP_MISC, false, false, load_config);
|
||||||
|
|
||||||
function update_arm_status() {
|
function update_arm_status() {
|
||||||
self.armed = bit_check(CONFIG.mode, 0);
|
self.armed = bit_check(CONFIG.mode, 0);
|
||||||
|
@ -448,23 +444,6 @@ TABS.motors.initialize = function (callback) {
|
||||||
|
|
||||||
$motorsEnableTestMode.change();
|
$motorsEnableTestMode.change();
|
||||||
|
|
||||||
// data pulling functions used inside interval timer
|
|
||||||
|
|
||||||
function periodicUpdateHandler() {
|
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_STATUS);
|
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) {
|
|
||||||
getPeriodicSensorStatus();
|
|
||||||
} else {
|
|
||||||
getPeriodicMotorOutput();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getPeriodicSensorStatus() {
|
|
||||||
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS, false, false, getPeriodicMotorOutput);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getPeriodicMotorOutput() {
|
function getPeriodicMotorOutput() {
|
||||||
MSP.send_message(MSPCodes.MSP_MOTOR, false, false, getPeriodicServoOutput);
|
MSP.send_message(MSPCodes.MSP_MOTOR, false, false, getPeriodicServoOutput);
|
||||||
}
|
}
|
||||||
|
@ -519,7 +498,7 @@ TABS.motors.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// enable Status and Motor data pulling
|
// enable Status and Motor data pulling
|
||||||
helper.interval.add('motor_and_status_pull', periodicUpdateHandler, 75, true);
|
helper.interval.add('motor_and_status_pull', getPeriodicMotorOutput, 75, true);
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
var loadChainer = new MSPChainerClass();
|
var loadChainer = new MSPChainerClass();
|
||||||
|
|
||||||
loadChainer.setChain([
|
loadChainer.setChain([
|
||||||
mspHelper.loadStatus,
|
|
||||||
mspHelper.loadPidNames,
|
mspHelper.loadPidNames,
|
||||||
mspHelper.loadPidData,
|
mspHelper.loadPidData,
|
||||||
mspHelper.loadRcTuningData,
|
mspHelper.loadRcTuningData,
|
||||||
|
@ -289,8 +288,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
send_pids();
|
send_pids();
|
||||||
});
|
});
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -221,8 +221,6 @@ TABS.ports.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
$('a.save').click(on_save_handler);
|
$('a.save').click(on_save_handler);
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,6 @@ TABS.profiles.initialize = function (callback, scrollPosition) {
|
||||||
content: $('#presetApplyContent')
|
content: $('#presetApplyContent')
|
||||||
});
|
});
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -470,7 +470,6 @@ TABS.receiver.initialize = function (callback) {
|
||||||
helper.interval.add('receiver_pull', get_rc_data, plot_update_rate, true);
|
helper.interval.add('receiver_pull', get_rc_data, plot_update_rate, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -443,8 +443,6 @@ TABS.sensors.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -188,8 +188,6 @@ TABS.servos.initialize = function (callback) {
|
||||||
// translate to user-selected language
|
// translate to user-selected language
|
||||||
localize();
|
localize();
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,6 @@ TABS.setup.initialize = function (callback) {
|
||||||
var loadChainer = new MSPChainerClass();
|
var loadChainer = new MSPChainerClass();
|
||||||
|
|
||||||
loadChainer.setChain([
|
loadChainer.setChain([
|
||||||
mspHelper.loadStatus,
|
|
||||||
mspHelper.loadMspIdent,
|
mspHelper.loadMspIdent,
|
||||||
mspHelper.loadBfConfig,
|
mspHelper.loadBfConfig,
|
||||||
mspHelper.loadMisc
|
mspHelper.loadMisc
|
||||||
|
@ -169,8 +168,6 @@ TABS.setup.initialize = function (callback) {
|
||||||
heading_e = $('dd.heading');
|
heading_e = $('dd.heading');
|
||||||
|
|
||||||
function get_slow_data() {
|
function get_slow_data() {
|
||||||
MSP.send_message(MSPCodes.MSP_STATUS);
|
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) {
|
if (semver.gte(CONFIG.flightControllerVersion, "1.5.0")) {
|
||||||
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS);
|
MSP.send_message(MSPCodes.MSP_SENSOR_STATUS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,8 +92,6 @@ TABS.transponder.initialize = function (callback, scrollPosition) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
helper.task.statusPullStart();
|
|
||||||
|
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue