
Edit - just checked the code and you're right! I'm lost for words!
Of course that is not great. Could also justify introducing a limp mode. Full shutdown on faults like this is probably more dangerous than the current behaviour in traffic.E46Driver wrote: ↑Thu Jul 20, 2023 7:14 pm I recall having my OI potMax parameter set to 3030. Which would equate to about 2.5V. Of course if the throttle was pressed hard enough to exceed this voltage - as soon as the voltage went above this, OI would shut down PWM and the motor would coast to a stop. When throttle was slowly released and voltage dropped below 2.5V, motor would instantly accelerate (to what OI thought was full throttle again).
Not sure what exactly happened there. Values 200 digits above potmax are still accepted and mapped to 100%. Maybe that was it?E46Driver wrote: ↑Thu Jul 20, 2023 7:14 pm Curious thing was that on random cases, it seemed like the throttle "stuck" and the motor would continue accelerating, instead of stopping after 2.5V. At the time I discounted it as stupid settings on my part --- ie --- potMax should have been 4095 since I was feeding the analog signal with 3.3V for max throttle. This testing was not done on the road (vehicle was up on blocks). But reading this thread got me wondering - could something possibly saturate the throttle input? Or the code managing the throttle (torque) demand calculation? And how scary would it be to have the vehicle acting on its own and not responding to your inputs! YIKES!
Agree, if you look at something like the Leaf protocol they do all this and for good reason.uhi22 wrote: ↑Thu Jul 20, 2023 8:54 pm For the safety relevant CAN messages, there are better methods in the field than just timeouts. They cover also situations where the sender is just repeating the same message again and again, and also cases when an other sender is sending garbage on a wrong ID which matches the critical ID.
The concept is: The message contains a running counter (e.g. four bits), and an CRC over all payload bytes and the counter. The receiver ignores messages which does not fit into the expected counter range, and ignores messages with wrong CRC. The receiver knows the nominal cycle time of the message, and checks in the same cycle whether a new, correct message was received. It fills a queue of n elements with the information "ok" or "fail", and uses the message only, if at least k of n messages are fine. The cycle time and the parameters n and k are chosen to match the fault tolerance time. (This is just a very basic description. The details are more complicated.) I guess different manufacturers using different methods, but I also guess a running counter and an additional CRC should be the minimum common standard.
Well the brake solves here the problems..johu wrote: ↑Fri Jul 21, 2023 6:26 am Just found on the news: https://eu.usatoday.com/story/money/car ... 439645007/
At least it's not just the hobby level open source stuff![]()
What do you mean by that? should that give priority to the brake over the gas pedal and make it impossible to accelerate and brake at the same time?