From d01c8dbd930031feccf3bc5807bce638f418d9b6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 6 Oct 2021 15:05:29 -0400 Subject: [PATCH] some cheap used junkyard Accelerometer #2225 MM5.10 --- firmware/console/status_loop.cpp | 2 +- firmware/controllers/can/can_rx.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 50908c62ca..1e5a6bca11 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -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; diff --git a/firmware/controllers/can/can_rx.cpp b/firmware/controllers/can/can_rx.cpp index 933fe6e8d3..316d0e2fd9 100644 --- a/firmware/controllers/can/can_rx.cpp +++ b/firmware/controllers/can/can_rx.cpp @@ -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; } }