To avoid accidents and damages motor cycles need to have a "safety system" consisting of the follow components
- ignition switch (on or off state)
- engine shut-off (kill) switch (on or off state)
- neutral gear switch (on or off state)
- clutch switch (on or off state)
- side stand switch (on or off state)
- tip-over switch (on or off state)
Only a certain combination of these switches in on or off condition will enable Starter switch to allow for starting engine.
From engine running state any change of this combination must kill a running engine.
1) How would logic for such a "safety system" be implemented (i.e. LUA script)?
None of above mentioned switches is named as such in rusefi/firmware/controllers/sensors/sensor_type.h
2) How would I define these sensors names?
Thanks
Michael
motor cycle "safety system" - how to implement?
-
- Posts: 39
- Joined: Sun Jun 05, 2022 10:37 pm
- Location: Tübingen, Germany
- Github Username: mi-hol
motor cycle "safety system" - how to implement?
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: motor cycle "safety system" - how to implement?
I'd say two Lua improvement would be needed: auxilary digital inputs (could be hacked with auxilary analog inputs as a work-around) and lua-controller ignition cut similar to current lua-controller ETB disable.
Once those are added, you would read digital inputs and disable ignition per your logic.
Not related to sensor_types.h
Once those are added, you would read digital inputs and disable ignition per your logic.
Not related to sensor_types.h
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: motor cycle "safety system" - how to implement?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
- Posts: 39
- Joined: Sun Jun 05, 2022 10:37 pm
- Location: Tübingen, Germany
- Github Username: mi-hol
Re: motor cycle "safety system" - how to implement?
Shall I create an issue for this feature?
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: motor cycle "safety system" - how to implement?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: motor cycle "safety system" - how to implement?
OEM bikes: kick stand must be up, or clutch applied to crank. Must be in neutral. Tip over only 85*. Kill switch should kill main ecu power (Unless canbus, in this case shut off fuel pump, injection, and ignition).
"Dave B. 5:03 PM
Mark is an ass but by far the most potent combination of knowledgeable ass, smart ass, get it done ass and determined ass. and his ass consistently puts in time."
-Dave B, Hero, Tuner, and probably has a car.
Mark is an ass but by far the most potent combination of knowledgeable ass, smart ass, get it done ass and determined ass. and his ass consistently puts in time."
-Dave B, Hero, Tuner, and probably has a car.
-
- Posts: 39
- Joined: Sun Jun 05, 2022 10:37 pm
- Location: Tübingen, Germany
- Github Username: mi-hol
Re: motor cycle "safety system" - how to implement?
for "ignition switch (on or off state)" I searched https://github.com/rusefi/rusefi/blob/master/firmware/controllers/lua/generated/value_lookup_generated.md
and https://github.com/rusefi/rusefi/blob/master/firmware/controllers/lua/generated/output_lookup_generated.cpp
and found:
isIgnitionEnabled
Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings.
but none of the example scripts is using "isIgnitionEnabled".
Any hint where to look?
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
- AndreyB
- Site Admin
- Posts: 14292
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: motor cycle "safety system" - how to implement?
Those are from https://rusefi.com/online/view.php?msq=1349&dialog=injectorConfig and similar ignition dialog.
Tool-tips were wrong I've just wiped those out.
https://github.com/rusefi/rusefi/wiki/Lua-Scripting#getcalibrationname has an example
Tool-tips were wrong I've just wiped those out.
https://github.com/rusefi/rusefi/wiki/Lua-Scripting#getcalibrationname has an example
Code: Select all
getCalibration("cranking.rpm")
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
- Posts: 39
- Joined: Sun Jun 05, 2022 10:37 pm
- Location: Tübingen, Germany
- Github Username: mi-hol
Re: motor cycle "safety system" - how to implement?
Apologize, but none of the answers above makes sense to me.
Did you maybe want to reply to a different question ?
Did you maybe want to reply to a different question ?
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
-
- Posts: 39
- Joined: Sun Jun 05, 2022 10:37 pm
- Location: Tübingen, Germany
- Github Username: mi-hol
Re: motor cycle "safety system" - how to implement?
As the topic was resolved on Slack here is the summary:
the text "isIgnitionEnabled
Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings."
is plainly wrong and was removed, such a function NEVER existed in LUA
the text "isIgnitionEnabled
Enable ignition - This is default off for new projects as a safety feature, set to "true" to enable ignition and further ignition settings."
is plainly wrong and was removed, such a function NEVER existed in LUA
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
-
- Posts: 39
- Joined: Sun Jun 05, 2022 10:37 pm
- Location: Tübingen, Germany
- Github Username: mi-hol
Re: motor cycle "safety system" - how to implement?
Thanks for reply, in the meantime I found that the safety system is actually implemented independent of ECU.
This removed the requirement to implement it via a LUA script.
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)