There is a bug in MiniDisplayLibrary that causes swapped lines on the DM140GINK VFD display.
In the device driver (DM140GINK.cs) lines are written to the display by calling writeLine(int LineNo, string text) in VFD_Control.cs. Unfortunately the LineNo parameter in DM140GINK.cs counts up fom 0 (1st line) to 1 (2nd line), while writeLine() expects it to count up from 1 to 2. As there is only a simple check
in writeLine() this results in showing the first line as bottom line and the second line as top line.
My patch corrects this by adding +1 to LineNo before calling writeLine() in DM140GINK.cs .
Michael
PS:
I made the patch in DM140GINK.cs because I can verify the bug only for the DM140GINK display that I have in my PC and do not want to cause side effects for other displays. But it seems to me most likely that the real bug is not in DM140GINK.cs but in the writeLine() code in VFD_Control.cs which is using a wrong way of counting. If I were right then the other display (SCALEO E) calling this writeLine() procedure would also show swapped lines and the code in VFD_Control.cs should be revised instead of patching the calling code. It would be great if someone with a SCALEO E could check that...
In the device driver (DM140GINK.cs) lines are written to the display by calling writeLine(int LineNo, string text) in VFD_Control.cs. Unfortunately the LineNo parameter in DM140GINK.cs counts up fom 0 (1st line) to 1 (2nd line), while writeLine() expects it to count up from 1 to 2. As there is only a simple check
Code:
if (LineNo == 1)
My patch corrects this by adding +1 to LineNo before calling writeLine() in DM140GINK.cs .
Michael
PS:
I made the patch in DM140GINK.cs because I can verify the bug only for the DM140GINK display that I have in my PC and do not want to cause side effects for other displays. But it seems to me most likely that the real bug is not in DM140GINK.cs but in the writeLine() code in VFD_Control.cs which is using a wrong way of counting. If I were right then the other display (SCALEO E) calling this writeLine() procedure would also show swapped lines and the code in VFD_Control.cs should be revised instead of patching the calling code. It would be great if someone with a SCALEO E could check that...