speeduino
speeduino copied to clipboard
Add support for RusEFI CAN Wideband based on STM32F042
This PR allows the use of the CAN controller created by the RusEFI project based on the stm32f042 and stm32f103. The module works on ID 400 and can be further expanded for example to enable the heater once the engine is running.
I would also recommend at least checking the valid bit. I'm not sure if Speeduino has support for "this sensor is present but currently not working" or not, but blindly reading the lambda field without first checking validity (at least to set lambda=0 or something) could have unexpected behavior.
@mck1117 what is the expected range of the controller? 0.5 - 1.4?
This is somewhat compatible with AEM CANbus protocol it should probably be mentioned somewhere?
This is somewhat compatible with AEM CANbus protocol it should probably be mentioned somewhere?
Yes we discussed this already with @noisymime to make it more general to allow for easier use of other CAN wbo solutions like AEM or EcuMaster.
Also thanks for pointing out the typo and case mismatches.
This is somewhat compatible with AEM CANbus protocol it should probably be mentioned somewhere?
No, it isn't. That protocol was abandoned in favor of the current one.
I made some small changes to this so that it can be expanded to other module in the future (IE the rusEFI module is just the first and only in the list, but others can be added when written).
One thing I did come across when looking at this though is that the check for the CAN msg ID is separate from the other CAN reads, which makes me wonder what happens if this is on a bus that has many other messages on it.
If there is already another msg waiting in the CAN buffer, the check for id's 0x190 or 0x192 will always fail. At best it will mean that the O2 signal is not read until the next 30Hz cycle, at worst they may never get read.
Has this been tested with other CAN devices broadcasting or on an isolated bus only?
@mck1117 do You recall the update rate of the controller? 50hz?