dm140: add driver #47

Open
wants to merge 1 commit into
from

Projects

None yet

3 participants

@awiouy
awiouy commented Jan 11, 2017

Hello,
The dm140 driver exists as a patch to LibreELEC/OpenELEC.
It would however be profitable to merge it upstream.
Thank you for your attention and support.

@awiouy
awiouy commented Jan 11, 2017

Hm... It builds with LibreELEC.
I would need some help to fix failing tests.

@haraldg

Thanks for looking into this. However clearly more work is needed before merging this (if possible at all). Please see the lcdproc developers guide for requirements of new drivers, especially copyright, documentation and coding style.

The various files included make me a bit uneasy. Where are the coming from? Shouldn't there be an external dependency instead?

I added a number of inline comments, pointing out obvious issues. But this is far from complete.

Also it seems your code doesn't acutally build. Have a look at the build logs to see what the problem is.

@@ -9,7 +9,7 @@ AC_ARG_ENABLE(drivers,
[ which is a comma-separated list of drivers.]
[ Possible drivers are:]
[ bayrad,CFontz,CFontzPacket,curses,CwLnx,ea65,]
- [ EyeboxOne,futaba,g15,glcd,glcdlib,glk,hd44780,i2500vfd,]
+ [ dm140,EyeboxOne,futaba,g15,glcd,glcdlib,glk,hd44780,i2500vfd,]
@haraldg
haraldg Jan 11, 2017 Collaborator

please keep the alphabetic sorting

@@ -128,6 +128,10 @@ dnl else
DRIVERS="$DRIVERS debug${SO}"
actdrivers=["$actdrivers debug"]
;;
+ dm140)
+ DRIVERS="$DRIVERS dm140${SO}"
+ actdrivers=["$actdrivers dm140"]
@haraldg
haraldg Jan 11, 2017 Collaborator

Here you should ensure that all necessary dependencies are available.

@@ -0,0 +1,241 @@
+/*
+ * dm1400 vfd driver (c)2007 Henrik Larsson
+ */
@haraldg
haraldg Jan 11, 2017 Collaborator

Um, what's the license of this code? And I think it is lcdproc policy to only merge code with the actual authors consent...

+ if (p == NULL)
+ {
+ report(RPT_CRIT, "Failed to allocate memory for PrivateData\n");
+ return -1;
@haraldg
haraldg Jan 11, 2017 Collaborator

I think RPT_CRIT is a bit thouch. Other drivers use RPT_ERR

+ p->gFlags = 0;
+ p->gDisplayMode = VFD_MODE_NONE;
+
+ if ((p->framebuf = (char *) calloc(1, p->height)) == NULL)
@haraldg
haraldg Jan 11, 2017 Collaborator

AFAIKS this allocation doesn't match the declaration.

+ int i;
+
+ report(RPT_INFO, "%s called with values(x,y,c): %d, %d, %s", __FUNCTION__, x, y, buffer);
+
@haraldg
haraldg Jan 11, 2017 Collaborator

Probably you want debug() instead of report() here.

+ VFDSetString(drvthis, y, 1, p->framebuf[i]);
+ }
+
+ // Don't know what to do
@haraldg
haraldg Jan 11, 2017 Collaborator

That's not very reassuring ...

@awiouy
awiouy commented Jan 11, 2017

My intention is only to have this merged upstream, for the benefit of everyone. I did not write the code and I would be unable to fix it. A quick search suggests that the author submitted it to lcdproc 0.5.3 (https://www.mythtv.org/wiki/Futaba). I do not know why it has not been merged, yet.

lcdproc devs could maybe take this up from here? Thank you in advance.

@haraldg
Collaborator
haraldg commented Jan 11, 2017

My intention is only to have this merged upstream, for the benefit of everyone. I did not write the code and I would be unable to fix it. A quick search suggests that the author submitted it to lcdproc 0.5.3 (https://www.mythtv.org/wiki/Futaba). I do not know why it has not been merged, yet.

If you followed the link on this wiki page, it would have been obvious to you why it hasn't been merged yet: License isses. Like what I wrote an hour ago.

However a driver called futaba was merged recently. I don't know if this supports the same HW. You would need to chack that yourself.

lcdproc devs could maybe take this up from here?

Most certainly not.

@CvH CvH referenced this pull request Jan 11, 2017
Closed

dm140 drivers #48

@GeoSimos
GeoSimos commented Jan 11, 2017 edited

Hello,
The FUTABA driver merged before doesn't cover the "DM-140gink" device, it covers MDM166 which isn't compatible with DM-140 (or dm140).
There is also a patch for OpenELEC here: https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/sysutils/lcdproc/patches/lcdproc-0.5.6-dm140_henlar_v0.2.patch
Please you are kindly requested to add support for this popular LCD.

Thank you.

@haraldg
Collaborator
haraldg commented Jan 11, 2017

Personally I'm not interested in working on drivers, for which I don't have the HW to test them on. And it seems nobody else is really active. If dm140 is similar enough to the HW supported by the existing futaba driver, your best bet probably is to ask the author of the futaba driver if he is interested in adding support to his driver. (Or find somebody else who cares enough to do the work.)

Since I feel somewhat pestered, I want to point out that drivers aren't added to lcdproc based on the popularity of the HW. Drivers are added if the HW is available easily enough (eg can be purchased new) AND somebody provides code of sufficient quality and proper licensing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment