mag declination handling changes

10.3.x-maintenance
cTn 2014-01-15 15:17:29 +01:00
parent b9a09b38a0
commit d8aca56961
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@
<span class="head">Magnetometer</span>
<div class="fields">
<dl>
<dt>Declination:</dt><dd><input type="number" name="mag_declination" min="-1800" max="1800" value="0" /></dd>
<dt>Declination:</dt><dd><input type="number" name="mag_declination" step="0.1" min="-180" max="180" value="0" /></dd>
</dl>
</div>
</div>

View File

@ -17,7 +17,7 @@ function tab_initialize_initial_setup() {
$('input[name="failsafe_throttle"]').val(MISC.failsafe_throttle);
$('input[name="mincommand"]').val(MISC.mincommand);
$('input[name="mag_declination"]').val(MISC.mag_declination);
$('input[name="mag_declination"]').val(MISC.mag_declination / 10);
// Fill in the accel trimms from CONFIG object
$('input[name="pitch"]').val(CONFIG.accelerometerTrims[0]);
@ -149,7 +149,7 @@ function tab_initialize_initial_setup() {
MISC.failsafe_throttle = parseInt($('input[name="failsafe_throttle"]').val());
MISC.mincommand = parseInt($('input[name="mincommand"]').val());
MISC.mag_declination = parseInt($('input[name="mag_declination"]').val());
MISC.mag_declination = parseFloat($('input[name="mag_declination"]').val()) * 10;
// we also have to fill the unsupported bytes
var buffer_out = new Array();