Dynamic table creation and axis selection

It's all about the code!
Post Reply
ssmith
Posts: 92
Joined: Sun Oct 17, 2021 10:21 pm

Dynamic table creation and axis selection

Post by ssmith »

I've brought this up in another thread but I think it deserves it's own. I think it's really important from a usability perspective that users have more control over the 2d and 3d maps used by the software. It makes it easier to write software (no need to predict every use case) and it makes it more flexible for tuners (who usually aren't programmers) to configure what they want. To me this means several things:
1. Every axis on every table should be user selectable. You can kind of do this in TunerStudio with massive if blocks but it's a pain and feels like an afterthought as opposed to integrated into the way logging/internal variables are managed by the ECU (the variables should be structured in a tree, any input and any intermediate/computed variable should be selectablle, the same way you select variables to log or tx/rx via CAN)
2. Should be easy to change the shape of a table (more or less columns/rows, up to some limit of course)
3. Should be able to reference the output of any other table as the input for any table (extension of #1)
4. Should have a collection of do-nothing tables that users can enable for the purpose of chaining tables together (either a table used to interpolate between two others, or a table that is used to add a % to another table, or a table that is straight up added to another table (same units), or select between two tables using a digital input.

Lua can kind of be used to provide some of this, but in a way that is much less approachable by non-programmers, and in a way that's harder to make clear in a GUI - i.e. we can name tables and see that name when looking up axis variables. For example, I can name "User Table 1" as "MAP Target", then when I look up variables to use in an axis for another table, I should be able to see "User Table 1 - MAP Target" instead of just "User Table 1."

These sound like minor issues but I think it's easy to underestimate the usefulness of having this level of integration in the GUI itself. It makes it easier to see how it all ties together.

Anyways I mocked up a start of a GUI. It's written in Python / QT, and I only tested it on Linux. I had another GUI I was starting in Python / WxWidgets but I ran into too many issues with their grid/spreadsheet widget. Let me know what you think and if you find this useful as a potential start for a RusEFI specific GUI. It might be that we can get TunerStudio to add the overall feature, as it seems they're currently receptive to improvements?
Attachments
tunedemo.py
Editted to fix bug I created when I combined two files into one
(16.45 KiB) Downloaded 131 times
ssmith
Posts: 92
Joined: Sun Oct 17, 2021 10:21 pm

Re: Dynamic table creation and axis selection

Post by ssmith »

(sorry, fixed bug in script, if it didn't work before try again)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Dynamic table creation and axis selection

Post by AndreyB »

Hold on, are you saying that
a) dynamic table size is worth looking into in immediate future
and
b) that would require new calibration UI?

As of today I am absolutely not available to think custom calibration UI.

There are some relevant items I am interested in right now but that would be off-topic for this thread.
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
ssmith
Posts: 92
Joined: Sun Oct 17, 2021 10:21 pm

Re: Dynamic table creation and axis selection

Post by ssmith »

For me the bigger issue is axis selection than dynamic table size; besides I believe TunerStudio can handle dynamic table size now if we would just implement the necessary changes in RusEFI.

Also dynamic table allocation is probably also needed as we have limited resources and need to allow different users to allocate tables to the things that are important to them.

Finally, while I recognize how far we've gotten by using TunerStudio so far, I feel like as it is it will not be capable of providing the user experience I expect. I don't know if this is affecting adoption by other users or not, or if it's just me being weird/picky. For me it comes down to
1. Convincing them to add features around CAN message assembly, table axis selection, variable tree organization, etc, or
2. Writing my own GUI.

Either one would require changes to the protocol/layout/etc. Now that TunerStudio is downloading the config over the protocol, maybe it's as simple as having a separate configuration GUI that lets you change axis and size, and then have the product emit a different config to TunerStudio so it can be used to actually tune the values in those tables. But IMO something needs to be done here.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Dynamic table creation and axis selection

Post by AndreyB »

ssmith wrote:
Sat Nov 27, 2021 6:53 am
1. Convincing them to add features around CAN message assembly, table axis selection, variable tree organization, etc, or
2. Writing my own GUI.
I wonder if there is 3. implement multi-frame CAN protocol and figure out what proper UI could be configured for our needs

See also https://github.com/rusefi/rusefi/issues/214
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
nmstec
contributor
contributor
Posts: 124
Joined: Tue Oct 05, 2021 9:02 pm
Location: Vancouver

Re: Dynamic table creation and axis selection

Post by nmstec »

I completely agree with the dynamic table sizes. I especially could use some with my negative throttle issue. Most manufacturers use a throttle request vs pedal request map, and we have something similar but its RPM based...? So shit like that. Could also use a bit more resolution in some maps, and way less in others
"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.
ssmith
Posts: 92
Joined: Sun Oct 17, 2021 10:21 pm

Re: Dynamic table creation and axis selection

Post by ssmith »

I started a GitHub project for a GUI that supports dynamic table creation and axis selection.

https://github.com/racer-coder/tunedemo

As an example, I demoed using an ethanol sensor to interpolate between two VE maps, and then adding coolant temp compensation on top of that, all configured by the user in the GUI, without having to teach the EMS about it.
Post Reply