some cheap used junkyard Accelerometer #2225

MM5.10
This commit is contained in:
rusefi 2021-10-06 15:05:29 -04:00
parent 07d25f9e66
commit d01c8dbd93
2 changed files with 2 additions and 1 deletions

View File

@ -731,7 +731,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->accelerationX = engine->sensors.accelerometer.x;
// 278
tsOutputChannels->accelerationY = engine->sensors.accelerometer.y;
tsOutputChannels->accelerationY = engine->sensors.accelerometer.z;
tsOutputChannels->accelerationZ = engine->sensors.accelerometer.z;
tsOutputChannels->accelerationRoll = engine->sensors.accelerometer.roll;
tsOutputChannels->accelerationYaw = engine->sensors.accelerometer.yaw;

View File

@ -152,6 +152,7 @@ static void processCanRxImu(const CANRxFrame& frame, efitick_t nowNt) {
engine->sensors.accelerometer.x = accX * MM5_10_ACC_QUANT;
} else if (CAN_SID(frame) == MM5_10_Z) {
float accZ = getShiftedLSB_intel(frame, 4);
efiPrintf("CAN_rx MM5_10_Z %f", accZ);
engine->sensors.accelerometer.z = accZ * MM5_10_ACC_QUANT;
}
}