mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 17:55:30 +03:00
change button bg color while calibrating
This commit is contained in:
parent
6715326a44
commit
3d58387f62
2 changed files with 30 additions and 2 deletions
|
@ -221,6 +221,14 @@ a:hover {
|
||||||
.tab-initial_setup .section a:hover {
|
.tab-initial_setup .section a:hover {
|
||||||
background-color: #424d84;
|
background-color: #424d84;
|
||||||
}
|
}
|
||||||
|
.tab-initial_setup .section a.calibrating {
|
||||||
|
background-color: #4f4f4f;
|
||||||
|
}
|
||||||
|
.tab-initial_setup .section a.calibrating:hover {
|
||||||
|
cursor: default;
|
||||||
|
background-color: #4f4f4f;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-initial_setup .section a.backup {
|
.tab-initial_setup .section a.backup {
|
||||||
width: 75px;
|
width: 75px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
|
@ -76,11 +76,31 @@ function tab_initialize_initial_setup() {
|
||||||
|
|
||||||
// UI Hooks
|
// UI Hooks
|
||||||
$('a.calibrateAccel').click(function() {
|
$('a.calibrateAccel').click(function() {
|
||||||
send_message(MSP_codes.MSP_ACC_CALIBRATION, MSP_codes.MSP_ACC_CALIBRATION);
|
var self = $(this);
|
||||||
|
|
||||||
|
if (!self.hasClass('calibrating')) {
|
||||||
|
self.addClass('calibrating');
|
||||||
|
|
||||||
|
send_message(MSP_codes.MSP_ACC_CALIBRATION, MSP_codes.MSP_ACC_CALIBRATION);
|
||||||
|
|
||||||
|
GUI.timeout_add('button_reset', function() {
|
||||||
|
self.removeClass('calibrating');
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.calibrateMag').click(function() {
|
$('a.calibrateMag').click(function() {
|
||||||
send_message(MSP_codes.MSP_MAG_CALIBRATION, MSP_codes.MSP_MAG_CALIBRATION);
|
var self = $(this);
|
||||||
|
|
||||||
|
if (!self.hasClass('calibrating')) {
|
||||||
|
self.addClass('calibrating');
|
||||||
|
|
||||||
|
send_message(MSP_codes.MSP_MAG_CALIBRATION, MSP_codes.MSP_MAG_CALIBRATION);
|
||||||
|
|
||||||
|
GUI.timeout_add('button_reset', function() {
|
||||||
|
self.removeClass('calibrating');
|
||||||
|
}, 30000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.resetSettings').click(function() {
|
$('a.resetSettings').click(function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue