mag declination handling changes
parent
b9a09b38a0
commit
d8aca56961
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue