PID controllers can now be reset to defaults
parent
c738e23a85
commit
19e6f9026b
|
@ -71,6 +71,7 @@ var MSP_codes = {
|
|||
MSP_SET_MOTOR: 214,
|
||||
MSP_SET_3D: 217,
|
||||
MSP_SET_RC_CONTROLS: 218,
|
||||
MSP_SET_RESET_CURR_PID: 219,
|
||||
|
||||
// MSP_BIND: 240,
|
||||
|
||||
|
@ -859,6 +860,9 @@ var MSP = {
|
|||
case MSP_codes.MSP_SET_ARMING_CONFIG:
|
||||
console.log('Arming config saved');
|
||||
break;
|
||||
case MSP_codes.MSP_SET_RESET_CURR_PID:
|
||||
console.log('Current PID profile reset');
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log('Unknown code detected: ' + code);
|
||||
|
|
|
@ -276,6 +276,11 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
}
|
||||
});
|
||||
|
||||
$('#resetPIDs').on('click', function(){
|
||||
MSP.send_message(MSP_codes.MSP_SET_RESET_CURR_PID, false, false, false);
|
||||
updateActivatedTab();
|
||||
});
|
||||
|
||||
$('.pid_tuning tr').each(function(){
|
||||
for(i = 0; i < PID_names.length; i++) {
|
||||
if($(this).hasClass(PID_names[i])) {
|
||||
|
|
Loading…
Reference in New Issue