change button bg color while calibrating
parent
6715326a44
commit
3d58387f62
|
@ -221,6 +221,14 @@ a:hover {
|
|||
.tab-initial_setup .section a:hover {
|
||||
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 {
|
||||
width: 75px;
|
||||
margin-right: 10px;
|
||||
|
|
|
@ -76,11 +76,31 @@ function tab_initialize_initial_setup() {
|
|||
|
||||
// UI Hooks
|
||||
$('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() {
|
||||
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() {
|
||||
|
|
Loading…
Reference in New Issue