check for CAMSTAB and CAMTRIG

fixes #12
10.3.x-maintenance
cTn 2013-12-05 10:07:13 +01:00
parent 5d1a8f7aa1
commit b950ad9fb8
1 changed files with 94 additions and 81 deletions

View File

@ -15,6 +15,7 @@ function tab_initialize_servos() {
// request current Servos Config // request current Servos Config
send_message(MSP_codes.MSP_IDENT, MSP_codes.MSP_IDENT, false, function() { send_message(MSP_codes.MSP_IDENT, MSP_codes.MSP_IDENT, false, function() {
send_message(MSP_codes.MSP_SERVO_CONF, MSP_codes.MSP_SERVO_CONF, false, function() { send_message(MSP_codes.MSP_SERVO_CONF, MSP_codes.MSP_SERVO_CONF, false, function() {
send_message(MSP_codes.MSP_BOXNAMES, MSP_codes.MSP_BOXNAMES, false, function() {
// drop previous table // drop previous table
$('div.tab-servos table.fields tr:not(:first)').remove(); $('div.tab-servos table.fields tr:not(:first)').remove();
@ -89,6 +90,17 @@ function tab_initialize_servos() {
break; break;
default: default:
model.html('Doesn\'t support servos'); model.html('Doesn\'t support servos');
// implementation of feature servo_tilt
if (AUX_CONFIG.indexOf('CAMSTAB') > -1 || AUX_CONFIG.indexOf('CAMTRIG') > -1) {
// Gimbal on
// needs to be verified
model.html('Gimbal / Tilt Servos');
// rate
process_servos('Pitch Servo', '', 0, 2);
process_servos('Roll Servo', '', 1, 2);
}
} }
// UI hooks for dynamically generated elements // UI hooks for dynamically generated elements
@ -100,6 +112,7 @@ function tab_initialize_servos() {
}); });
}); });
}); });
});
$('a.update').click(function() { $('a.update').click(function() {
if (supported_models.indexOf(CONFIG.multiType) != -1) { if (supported_models.indexOf(CONFIG.multiType) != -1) {