LCDproc development and user support list

Text archives Help


[lcdproc] config file


Chronological Thread 
  • From: ed.hunter AT seznam.cz (Ed Hunter)
  • Subject: [lcdproc] config file
  • Date: Mon Oct 1 19:01:01 2001

David Douthitt wrote:

> Ed Hunter wrote:
>
>
>>I just wonder, why is the display size bound to driver??? It should be
>>bound to actual display. Driver should be able to serve more displays.
>>
>
> The display size is a property of each individual display (which the
> driver serves). Handling multiple output sources of varying sizes would
> be a nightmare, really. What if you have a 20x2, 20x4, 80x2, and 40x16
> displays?


If it's nightmare, it's because of bad development decisions :)

For example. hd44780 driven displays can have various sizes, 16x2, 20x2,
etc. So the driver has to handle various sizes - depending on setting of
some variable, ok?

so why not to have all display-related variables in display structure?
The driver would take this info from there. In your applications, you
would address displays, not drivers.

Like this:

struct Driver {
void* init_fn,
void* flush_fn,
....
}

struct Display {
char *name;
char *device;
char *framebuffer;
int sizex;
int sizey;
Driver *driver;
void *driver_data; // driver specific data, like handle for device
};

in driver:

hd44780_framebuffer_flush (Display *display)
{
// takes size, fb and device from display and outputs fb to device
}

in config file:

[display_big]
size=20x4
driver=hd44780
device=/dev/lp0


And then:

LCDd -d big

So what is so nightmareous here? I am rather surprised the lcdproc is
not working like this from the start :)

Give me one reason why is it difficult? IMNSHO this makes more sense
than current: one display=one driver





Archive powered by MHonArc 2.6.18.

Top of page