Merge branch 'master' of https://github.com/rusefi/rusefi into master

This commit is contained in:
rusefillc 2023-12-18 13:19:29 -05:00
commit e497efa504
2 changed files with 10 additions and 6 deletions

View File

@ -178,8 +178,10 @@ void processCanRxMessage(const size_t busIndex, const CANRxFrame &frame, efitick
//Vss is configurable, should we handle it here:
processCanRxVss(frame, nowNt);
// todo: convert to CanListener or not?
processCanRxImu(frame);
if (!engineConfiguration->useSpiImu) {
// todo: convert to CanListener or not?
processCanRxImu(frame);
}
processCanBenchTest(frame);

View File

@ -124,10 +124,12 @@ private:
lsm303agrAccelerometerReadCooked(&LIS2DH12, acccooked);
#endif
/* milli-G to G */
engine->sensors.accelerometer.lat = acccooked[0] / 1000.0;
engine->sensors.accelerometer.lon = acccooked[1] / 1000.0;
engine->sensors.accelerometer.vert = acccooked[2] / 1000.0;
if (engineConfiguration->useSpiImu) {
/* milli-G to G */
engine->sensors.accelerometer.lat = acccooked[0] / 1000.0;
engine->sensors.accelerometer.lon = acccooked[1] / 1000.0;
engine->sensors.accelerometer.vert = acccooked[2] / 1000.0;
}
}
};