mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Merge remote-tracking branch 'multiwii/master'
Conflicts: _locales/en/messages.json tabs/auxiliary_configuration.html tabs/auxiliary_configuration.js tabs/receiver.css
This commit is contained in:
commit
58f933e92c
45 changed files with 1819 additions and 632 deletions
13
js/msp.js
13
js/msp.js
|
@ -175,6 +175,7 @@ MSP.process_data = function(code, message_buffer, message_length) {
|
|||
CONFIG.profile = data.getUint8(10);
|
||||
|
||||
sensor_status(CONFIG.activeSensors);
|
||||
$('span.i2c-error').text(CONFIG.i2cError);
|
||||
$('span.cycle-time').text(CONFIG.cycleTime);
|
||||
break;
|
||||
case MSP_codes.MSP_RAW_IMU:
|
||||
|
@ -232,9 +233,9 @@ MSP.process_data = function(code, message_buffer, message_length) {
|
|||
GPS_DATA.update = data.getUint8(4);
|
||||
break;
|
||||
case MSP_codes.MSP_ATTITUDE:
|
||||
SENSOR_DATA.kinematicsX = data.getInt16(0, 1) / 10.0;
|
||||
SENSOR_DATA.kinematicsY = data.getInt16(2, 1) / 10.0;
|
||||
SENSOR_DATA.kinematicsZ = data.getInt16(4, 1);
|
||||
SENSOR_DATA.kinematics[0] = data.getInt16(0, 1) / 10.0; // x
|
||||
SENSOR_DATA.kinematics[1] = data.getInt16(2, 1) / 10.0; // y
|
||||
SENSOR_DATA.kinematics[2] = data.getInt16(4, 1); // z
|
||||
break;
|
||||
case MSP_codes.MSP_ALTITUDE:
|
||||
SENSOR_DATA.altitude = parseFloat((data.getInt32(0, 1) / 100.0).toFixed(2)); // correct scale factor
|
||||
|
@ -285,8 +286,7 @@ MSP.process_data = function(code, message_buffer, message_length) {
|
|||
}
|
||||
break;
|
||||
case MSP_codes.MSP_BOX:
|
||||
// dump previous data (if there was any)
|
||||
AUX_CONFIG_values = new Array();
|
||||
AUX_CONFIG_values = []; // empty the array as new data is coming in
|
||||
|
||||
var boxItems = data.byteLength / 2; // AUX 1-4, 2 bytes per boxItem
|
||||
if (bit_check(CONFIG.capability, 5)) {
|
||||
|
@ -359,8 +359,7 @@ MSP.process_data = function(code, message_buffer, message_length) {
|
|||
console.log(data);
|
||||
break;
|
||||
case MSP_codes.MSP_SERVO_CONF:
|
||||
// drop previous data
|
||||
SERVO_CONFIG = [];
|
||||
SERVO_CONFIG = []; // empty the array as new data is coming in
|
||||
|
||||
for (var i = 0; i < 56; i += 7) {
|
||||
var arr = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue