no more playing nice with official msp

10.3.x-maintenance
cTn 2014-02-04 19:00:53 +01:00
parent 430d366c8f
commit a9f73b6384
1 changed files with 5 additions and 9 deletions

View File

@ -479,17 +479,13 @@ function process_data(code, message_buffer, message_length) {
break; break;
// Additional baseflight commands that are not compatible with MultiWii // Additional baseflight commands that are not compatible with MultiWii
case MSP_codes.MSP_UID: case MSP_codes.MSP_UID:
if (data.byteLength > 0) {
CONFIG.uid[0] = data.getUint32(0, 1); CONFIG.uid[0] = data.getUint32(0, 1);
CONFIG.uid[1] = data.getUint32(4, 1); CONFIG.uid[1] = data.getUint32(4, 1);
CONFIG.uid[2] = data.getUint32(8, 1); CONFIG.uid[2] = data.getUint32(8, 1);
}
break; break;
case MSP_codes.MSP_ACC_TRIM: case MSP_codes.MSP_ACC_TRIM:
if (data.byteLength > 0) {
CONFIG.accelerometerTrims[0] = data.getInt16(0, 1); // pitch CONFIG.accelerometerTrims[0] = data.getInt16(0, 1); // pitch
CONFIG.accelerometerTrims[1] = data.getInt16(2, 1); // roll CONFIG.accelerometerTrims[1] = data.getInt16(2, 1); // roll
}
break; break;
case MSP_codes.MSP_SET_ACC_TRIM: case MSP_codes.MSP_SET_ACC_TRIM:
console.log('Accelerometer trimms saved.'); console.log('Accelerometer trimms saved.');