1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

adding more user-notify messages

This commit is contained in:
cTn 2014-02-04 18:52:21 +01:00
parent 60dbffd1ba
commit 8686a45831
7 changed files with 26 additions and 3 deletions

View file

@ -276,7 +276,9 @@ function configuration_upload() {
// Send ove the new MISC // Send ove the new MISC
send_message(MSP_codes.MSP_SET_MISC, buffer_out, false, function() { send_message(MSP_codes.MSP_SET_MISC, buffer_out, false, function() {
// Save changes to EEPROM // Save changes to EEPROM
send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE); send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>');
});
}); });
}; };
} }

View file

@ -148,6 +148,7 @@ function onOpen(openInfo) {
// request configuration data // request configuration data
send_message(MSP_codes.MSP_UID, MSP_codes.MSP_UID, false, function() { send_message(MSP_codes.MSP_UID, MSP_codes.MSP_UID, false, function() {
GUI.log('Unique device ID <span style="color: green">received</span>');
send_message(MSP_codes.MSP_IDENT, MSP_codes.MSP_IDENT, false, function() { send_message(MSP_codes.MSP_IDENT, MSP_codes.MSP_IDENT, false, function() {
GUI.timeout_remove('connecting'); // kill connecting timer GUI.timeout_remove('connecting'); // kill connecting timer

View file

@ -64,6 +64,8 @@ function tab_initialize_auxiliary_configuration() {
// Save changes to EEPROM // Save changes to EEPROM
send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() { send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>');
var element = $('a.update'); var element = $('a.update');
element.addClass('success'); element.addClass('success');

View file

@ -101,10 +101,15 @@ function tab_initialize_initial_setup() {
// During this period MCU won't be able to process any serial commands because its locked in a for/while loop // During this period MCU won't be able to process any serial commands because its locked in a for/while loop
// until this operation finishes, sending more commands through data_poll() will result in serial buffer overflow // until this operation finishes, sending more commands through data_poll() will result in serial buffer overflow
GUI.interval_pause('initial_setup_data_pull'); GUI.interval_pause('initial_setup_data_pull');
send_message(MSP_codes.MSP_ACC_CALIBRATION, MSP_codes.MSP_ACC_CALIBRATION); send_message(MSP_codes.MSP_ACC_CALIBRATION, MSP_codes.MSP_ACC_CALIBRATION, false, function() {
GUI.log('Accelerometer calibration started');
});
GUI.timeout_add('button_reset', function() { GUI.timeout_add('button_reset', function() {
GUI.interval_resume('initial_setup_data_pull'); GUI.interval_resume('initial_setup_data_pull');
GUI.log('Accelerometer calibration finished');
self.removeClass('calibrating'); self.removeClass('calibrating');
}, 2000); }, 2000);
} }
@ -116,9 +121,12 @@ function tab_initialize_initial_setup() {
if (!self.hasClass('calibrating')) { if (!self.hasClass('calibrating')) {
self.addClass('calibrating'); self.addClass('calibrating');
send_message(MSP_codes.MSP_MAG_CALIBRATION, MSP_codes.MSP_MAG_CALIBRATION); send_message(MSP_codes.MSP_MAG_CALIBRATION, MSP_codes.MSP_MAG_CALIBRATION, false, function() {
GUI.log('Magnetometer calibration started');
});
GUI.timeout_add('button_reset', function() { GUI.timeout_add('button_reset', function() {
GUI.log('Magnetometer calibration finished');
self.removeClass('calibrating'); self.removeClass('calibrating');
}, 30000); }, 30000);
} }
@ -126,6 +134,8 @@ function tab_initialize_initial_setup() {
$('a.resetSettings').click(function() { $('a.resetSettings').click(function() {
send_message(MSP_codes.MSP_RESET_CONF, MSP_codes.MSP_RESET_CONF, false, function() { send_message(MSP_codes.MSP_RESET_CONF, MSP_codes.MSP_RESET_CONF, false, function() {
GUI.log('Settings restored to <strong>default</strong>');
tab_initialize_initial_setup(); tab_initialize_initial_setup();
}); });
}); });
@ -185,6 +195,8 @@ function tab_initialize_initial_setup() {
// Save changes to EEPROM // Save changes to EEPROM
send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() { send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>');
var element = $('a.update'); var element = $('a.update');
element.addClass('success'); element.addClass('success');

View file

@ -249,6 +249,8 @@ function tab_initialize_pid_tuning() {
// Save changes to EEPROM // Save changes to EEPROM
send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() { send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>');
var element = $('a.update'); var element = $('a.update');
element.addClass('success'); element.addClass('success');

View file

@ -141,6 +141,8 @@ function tab_initialize_receiver() {
// Save changes to EEPROM // Save changes to EEPROM
send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() { send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>');
var element = $('a.update'); var element = $('a.update');
element.addClass('success'); element.addClass('success');

View file

@ -192,6 +192,8 @@ function servos_update(save_to_eeprom) {
if (save_to_eeprom) { if (save_to_eeprom) {
// Save changes to EEPROM // Save changes to EEPROM
send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() { send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE, false, function() {
GUI.log('EEPROM <span style="color: green">saved</span>');
var element = $('a.update'); var element = $('a.update');
element.addClass('success'); element.addClass('success');