Lua Scripting
-
- Posts: 91
- Joined: Wed Mar 31, 2021 10:00 pm
- AndreyB
- Site Admin
- Posts: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
exactly
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: Lua Scripting
So to do some bench hardware coding in Lua, RusEFI simulator now supports interaction to a physical hardware can device (via SocketCan) on Linux!
Which means, with just a standard can adapter (I am using a peak clone) I can attach simulator to a real can device and do Lua Development.
What a time to be alive.
So I am going to do some tidy up on the iDrive code and see what we can come up with.
@mck1117 is a deadset legend.
Which means, with just a standard can adapter (I am using a peak clone) I can attach simulator to a real can device and do Lua Development.
What a time to be alive.
So I am going to do some tidy up on the iDrive code and see what we can come up with.
@mck1117 is a deadset legend.
- AndreyB
- Site Admin
- Posts: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
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: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
they wonder if we have reinvented a portion of https://forum.chibios.org/viewtopic.php?t=4861
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: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
New hooks to adjust closed loop boost target https://github.com/rusefi/rusefi/wiki/Lua-Scripting#setboostadd
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: Lua Scripting
im not a smart person, can you or some other smart person, have a step by step guide for dummies, i would like to increase boost with ethanol content and do a timing multiplier based on ethenol content and im sure lua can do it, i can understand the basics of the script, but im unable to implement them into tuner studioAndreyB wrote: ↑Thu Jul 14, 2022 5:10 pmNew hooks to adjust closed loop boost target https://github.com/rusefi/rusefi/wiki/Lua-Scripting#setboostadd
- AndreyB
- Site Admin
- Posts: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
As of today Lua scripting is only availbe in rusEFI console - tuner studio does not have provisions for multi-line text entry.
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: Lua Scripting
Yes but the tables are so I imagine you build the script
In the console with an “id” so you can assign table values in tuner studio
Sent from my iPhone using Tapatalk
In the console with an “id” so you can assign table values in tuner studio
Sent from my iPhone using Tapatalk
- AndreyB
- Site Admin
- Posts: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
I can help once the vehicle is overall running under rusEFI. On the one hand do not worry you'll have it, on the other hand please understand that I have to set priorities based on actual vehicle needs.
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: Lua Scripting
Understand I’ll stop bugging,AndreyB wrote:I can help once the vehicle is overall running under rusEFI. On the one hand do not worry you'll have it, on the other hand please understand that I have to set priorities based on actual vehicle needs.
Sent from my iPhone using Tapatalk
Re: Lua Scripting
I wonder if it is possible to implement a simple ALS (anti lag) strategy using LUA script. I will ask for your opinion whether it is feasible at all.
- AndreyB
- Site Admin
- Posts: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
Short answer is yes. A more specific question would be needed fpr more specifuc answer
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: Lua Scripting
Thanks for the quick reply Andrei. I don't quite know how to do it. If you have an idea or a ready script, I can test it (at my own risk) on my car. Otherwise, I will work on it slowly and share the script when it's ready.
- AndreyB
- Site Admin
- Posts: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
Let's assume
Q1: what would you expect the output to be?
Q2: WHY IS IT SO WEIRD?!
Code: Select all
print (1 and "1 is true" or "1 is false")
print (0 and "0 is true" or "0 is false")
print (nil and "nil is true" or "nil is false")
Q2: WHY IS IT SO WEIRD?!
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: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
PS: Q3 what shall we do about it?!
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
-
- running engine in first post
- Posts: 1495
- Joined: Mon Jan 30, 2017 2:05 am
- Location: Seattle-ish
Re: Lua Scripting
lua has true and false and they work fine
- AndreyB
- Site Admin
- Posts: 14373
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Lua Scripting
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