MtxOrb need to be maintained. I lost custom char and Contrast goes wrong.

This commit is contained in:
dglaude
2002-10-19 21:13:38 +00:00
parent 94efcc17a0
commit 060f8d2faf
2 changed files with 10 additions and 8 deletions
+6 -6
View File
@@ -56,10 +56,10 @@ Bind=127.0.0.1
Port=13666
# Listen on this specified port; defaults to 13666.
#ReportLevel=3
ReportLevel=4
# Sets the reporting level; defaults to 2 (warnings and errors only).
#ReportToSyslog=yes
ReportToSyslog=no
# Should we report to syslog instead of stderr ? Default: no
WaitTime=5
@@ -74,7 +74,7 @@ User=nobody
# it will be a background screen, only visible when no other screens are
# active.
Foreground=no
Foreground=yes
# The server will stay in the foreground if set to true.
DriverPath=server/drivers/
@@ -350,7 +350,7 @@ Device=/dev/ttyS1
# Matrix Orbital driver
# Select the output device to use [/dev/lcd]
device=/dev/lcd
device=/dev/ttyS0
# Set the display size [20x4]
size=20x4
@@ -364,14 +364,14 @@ enablebacklight=yes
# Set the initial contrast [140]
# NOTE: The driver will ignore this if the display
# is a vfd or vfd as they don't have this feature
contrast=140
contrast=800
# Set the communication speed [19200]
speed=19200
# Set the display type [lcd]
# Possible settings: lcd, lkd, vfd, vkd
type=lcd
type=lkd
# See [input] section for an explanation of the key mappings
# This might not be implemented in 0.5 but is implented in 0.4.3
+4 -2
View File
@@ -200,6 +200,8 @@ typedef struct p {
int cellwidth;
int cellheight;
char info[255]; /* static data from MtxOrb_get_info */
/* LibData *libdata; */
/* Private Data of the new library: Work in progress */
} PrivateData;
/* Vars for the server core */
@@ -308,10 +310,10 @@ MtxOrb_init (Driver *drvthis, char *args)
p->widthBYheight = w * h;
/* Get contrast */
if (0<=drvthis->config_get_int ( drvthis->name , "Contrast" , 0 , DEFAULT_CONTRAST) && drvthis->config_get_int ( drvthis->name , "Contrast" , 0 , DEFAULT_CONTRAST) <= 255) {
if (0<=drvthis->config_get_int ( drvthis->name , "Contrast" , 0 , DEFAULT_CONTRAST) && drvthis->config_get_int ( drvthis->name , "Contrast" , 0 , DEFAULT_CONTRAST) <= 1000) {
contrast = drvthis->config_get_int ( drvthis->name , "Contrast" , 0 , DEFAULT_CONTRAST);
} else {
report (RPT_WARNING, "MtxOrb: Contrast must be between 0 and 255. Using default value.");
report (RPT_WARNING, "MtxOrb: Contrast must be between 0 and 1000. Using default value.");
}
/* Get speed */