summaryrefslogtreecommitdiff
path: root/glcddrivers/g15daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'glcddrivers/g15daemon.c')
-rw-r--r--glcddrivers/g15daemon.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/glcddrivers/g15daemon.c b/glcddrivers/g15daemon.c
index e275b38..daa0b9b 100644
--- a/glcddrivers/g15daemon.c
+++ b/glcddrivers/g15daemon.c
@@ -7,6 +7,8 @@
* This file is released under the GNU General Public License. Refer
* to the COPYING file distributed with this package.
*
+* (c) 2005-2010 Andreas Regel <andreas.regel AT powarman.de>
+* (c) 2011-2012 Wolfgang Astleitner <mrwastl AT users.sourceforge.net>
*/
#include <fcntl.h>
@@ -105,16 +107,10 @@ namespace GLCD
{
cDriverG15daemon::cDriverG15daemon(cDriverConfig * config)
-: config(config),
+: cDriver(config),
offbuff(0),
sockfd(-1)
{
- oldConfig = new cDriverConfig(*config);
-}
-
-cDriverG15daemon::~cDriverG15daemon()
-{
- delete oldConfig;
}
int cDriverG15daemon::Init()
@@ -150,8 +146,8 @@ int cDriverG15daemon::Init()
int cDriverG15daemon::DeInit()
{
- if (offbuff);
- delete[] offbuff;
+ if (offbuff)
+ delete[] offbuff;
if (-1 != sockfd)
close(sockfd);
@@ -180,7 +176,7 @@ int cDriverG15daemon::CheckSetup()
return 0;
}
-void cDriverG15daemon::SetPixel(int x, int y)
+void cDriverG15daemon::SetPixel(int x, int y, uint32_t data)
{
if (x >= width || y >= height)
return;
@@ -191,7 +187,7 @@ void cDriverG15daemon::SetPixel(int x, int y)
y = height - 1 - y;
}
- offbuff[x + (width * y)] = 1;
+ offbuff[x + (width * y)] = ( (data == GRAPHLCD_White) ? 1 : 0 );
}
void cDriverG15daemon::Clear()
@@ -199,6 +195,7 @@ void cDriverG15daemon::Clear()
memset(offbuff, 0, screensize);
}
+#if 0
void cDriverG15daemon::Set8Pixels(int x, int y, unsigned char data)
{
int n;
@@ -208,9 +205,10 @@ void cDriverG15daemon::Set8Pixels(int x, int y, unsigned char data)
for (n = 0; n < 8; ++n)
{
if (data & (0x80 >> n)) // if bit is set
- SetPixel(x + n, y);
+ SetPixel(x + n, y, GRAPHLCD_White);
}
}
+#endif
void cDriverG15daemon::Refresh(bool refreshAll)
{