support for multiwiicurrentoutput
parent
6f9c5cb6f2
commit
800bfd59c8
|
@ -29,8 +29,7 @@ var BF_CONFIG = {
|
|||
serialrx_type: 0,
|
||||
board_align_roll: 0,
|
||||
board_align_pitch: 0,
|
||||
board_align_yaw: 0,
|
||||
multiwiicurrentoutput: 0
|
||||
board_align_yaw: 0
|
||||
// TBD
|
||||
};
|
||||
|
||||
|
@ -112,7 +111,7 @@ var MISC = {
|
|||
gps_type: 0,
|
||||
gps_baudrate: 0,
|
||||
gps_ubx_sbas: 0,
|
||||
placeholder1: 0,
|
||||
multiwiicurrentoutput: 0,
|
||||
placeholder2: 0,
|
||||
mag_declination: 0, // not checked
|
||||
vbatscale: 0,
|
||||
|
|
|
@ -638,7 +638,7 @@ MSP.crunch = function (code) {
|
|||
buffer.push(MISC.gps_type);
|
||||
buffer.push(MISC.gps_baudrate);
|
||||
buffer.push(MISC.gps_ubx_sbas);
|
||||
buffer.push(MISC.placeholder1);
|
||||
buffer.push(MISC.multiwiicurrentoutput);
|
||||
buffer.push(lowByte(MISC.placeholder2));
|
||||
buffer.push(highByte(MISC.placeholder2));
|
||||
buffer.push(lowByte(MISC.mag_declination));
|
||||
|
|
|
@ -227,7 +227,7 @@ TABS.configuration.initialize = function (callback) {
|
|||
$('input[name="mincellvoltage"]').val(MISC.vbatmincellvoltage);
|
||||
$('input[name="maxcellvoltage"]').val(MISC.vbatmaxcellvoltage);
|
||||
$('input[name="voltagescale"]').val(MISC.vbatscale);
|
||||
$('input[name="multiwiicurrentoutput"]').prop('checked', BF_CONFIG.multiwiicurrentoutput);
|
||||
$('input[name="multiwiicurrentoutput"]').prop('checked', MISC.multiwiicurrentoutput);
|
||||
|
||||
|
||||
// UI hooks
|
||||
|
@ -262,7 +262,7 @@ TABS.configuration.initialize = function (callback) {
|
|||
MISC.vbatmincellvoltage = parseFloat($('input[name="mincellvoltage"]').val()) * 10;
|
||||
MISC.vbatmaxcellvoltage = parseFloat($('input[name="maxcellvoltage"]').val()) * 10;
|
||||
MISC.vbatscale = parseInt($('input[name="voltagescale"]').val());
|
||||
BF_CONFIG.multiwiicurrentoutput = ~~$('input[name="multiwiicurrentoutput"]').is(':checked'); // ~~ boolean to decimal conversion
|
||||
MISC.multiwiicurrentoutput = ~~$('input[name="multiwiicurrentoutput"]').is(':checked'); // ~~ boolean to decimal conversion
|
||||
|
||||
function save_misc() {
|
||||
MSP.send_message(MSP_codes.MSP_SET_MISC, MSP.crunch(MSP_codes.MSP_SET_MISC), false, save_acc_trim);
|
||||
|
|
Loading…
Reference in New Issue