Ok, the first version of the Lua interface is done now, can be easily extended or changed, I just have to check what is all needed for a proper commit. For example, I moved quite some stuff into libUltra for resolving version conflicts here.
Working functions are "v:list_bundles()", which returns a list with the names of all cable bundles that we use (didn't realize that we already have so many), and "v:read_discrete(ident, ...) which is a multi-purpose function: Without additional parameters, it returns all voltages in the Bundle as return values (maybe I will make this a table), if you call it with a list of integers after the bundle identifier, you can query individual lines.
eg.:
Code:
v1, v2, v3 = ssu:read_discrete('RMS_EE', 3, 5, 7)
The Lua interpreter isn't the fastest interface, but it does the job. and you can of course prepare tests as Lua files and execute them.
I'll now check all modifications here for committing, I moved a lot of stuff into libUltra.
---------- Post added at 11:42 PM ---------- Previous post was at 10:05 PM ----------
Can somebody help me getting the vectors for implementing the VC regions for the A1U panel? I can't load the mesh in meshwizard, because I run out of virtual memory then on my PC, which makes it pretty tough.
I pretty much need:
- the corners of a rectangle in which all switches are located
- The rotation references for the switches (including rotary)
- the rotation reference for the signal strength meter
I can also use the same coordinates already for the other A1 panels, once I have the data, making the panels work is pretty straight forward work.
I think about doing a small extension to the VC handling code for permitting a single panel having multiple mouse regions, in this case, I would work with multiple rectangles that define the mouse event regions for the switches...would permit defining the VC without going beyond the hull, but it is not really necessary yet.
PS: I also found the data for the relays, fuses and circuit breakers in the Operational Data, could add the technical data for those into libUltra.