ElektraInitiative / lcdproc

Client/server suite for controlling a wide variety of LCD devices
http://lcdproc.org/
GNU General Public License v2.0
2 stars 1 forks source link

Elektrify with highlevel API and code-generation #7

Closed kodebach closed 4 years ago

kodebach commented 5 years ago

Changes:


Because of ElektraInitiative/libelektra#2634 the spec for drivers is essentially useless. To make the server work with the curses driver for example you need to do (at least) the following in addition to the normal mount + spec-mount:

kdb set "/sw/lcdproc/lcdd/#0/current/drivers/#0" curses
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/file" curses
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/background" cyan
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/foreground" blue
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/backlight" red
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/brightness" 1000
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/contrast" 1000
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/offbrightness" 0
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/reboot" 0
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/size" 20x4
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/topleftx" 7
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/toplefty" 7
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/useacs" 0
kdb set "/sw/lcdproc/lcdd/#0/current/curses/#0/drawborder" 1
markus2330 commented 5 years ago

Is this draft PR a new feature? You tell me when I should look at this PR?

kodebach commented 5 years ago

Is this draft PR a new feature?

I think it existed for some time, but it is pretty weird in some respects. e.g. CI systems seem to react differently to it, some run the build and other don't.

You tell me when I should look at this PR?

Yes, I will tag you when it is ready. I found that I need an addition to the API to implement lcdexec the way I want to.

markus2330 commented 5 years ago

Yes, I will tag you when it is ready.

Note that I will not poll here, so please mention me.

kodebach commented 5 years ago

@markus2330 You can take a look at the code now. If you want to compile it, you need to use the Elektra version from ElektraInitiative/libelektra#2707.

Actually using the new version will be tedious however, because I still need to fix the spec plugin, so defaults for array elements work. So until that is done, I suggest you only look at the code. If you really want to try stuff, start by copying curses config from above and expect lots of "Key xyz not found" errors where you manually need to set the default.

My plan is to not update anymore drivers and work on my thesis instead. The remaining drivers should mostly be straight-forward to update. I will probably do it, once my thesis is finished. But since I can't even test most of the drivers that I updated already, I don't really see any reason to waste time.

The readconf.py needs an update too, so using that won't work either right now.

Also I noticed that having boolean keys with default value true doesn't work. I don't know whether that is something that can be fixed though, because I think we would need to transform the default metakey in the type for that.

markus2330 commented 5 years ago

So until that is done, I suggest you only look at the code.

Ok!

The remaining drivers should mostly be straight-forward to update.

Are there any important drivers missing? Maybe @Piankero can help out?

The readconf.py needs an update too, so using that won't work either right now.

see #8

Also I noticed that having boolean keys with default value true doesn't work. I don't know whether that is something that can be fixed though, because I think we would need to transform the default metakey in the type for that.

I opened https://github.com/ElektraInitiative/libelektra/issues/2723

kodebach commented 5 years ago

readconf.py should now be able to convert old client configurations into the new versions. The conversion of LCDd.conf files is not supported yet. However, I think lcdexec configurations are the only ones that are really in need of automatic conversion, since those would be rather tedious to update manually.

kodebach commented 5 years ago

There is now some basic documentation about how to use this PR. I will update it further once I finish the documentation on the Elektra side.

Also, for now the documentation is in separate files, since that was quicker than updating the old ones.

markus2330 commented 4 years ago

@kodebach can you please merge this to master?

If possible, please also rebase our master (of https://github.com/ElektraInitiative/lcdproc) to the current master of LCDproc.

markus2330 commented 4 years ago

Thank you! So @haraldg can now test the master.