From 0c07dacfeadf8e2cab8563271653e32d086e9455 Mon Sep 17 00:00:00 2001 From: toykeeper Date: Thu, 25 May 2000 18:21:22 +0000 Subject: [PATCH] Another attempt to fix the MtxOrb weirdness. Changed the general-purpose output so it doesn't send anything unless something actually happened. --- server/client_functions.c | 2 ++ server/drivers/MtxOrb.c | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/client_functions.c b/server/client_functions.c index 9f76bae..703dcf4 100644 --- a/server/client_functions.c +++ b/server/client_functions.c @@ -879,6 +879,8 @@ output_func (client * c, int argc, char **argv) } else { if (0 == strcmp (argv[1], "on")) output_state = 1; + else if (0 == strcmp (argv[1], "off")) + output_state = -1; else output_state = 0; } diff --git a/server/drivers/MtxOrb.c b/server/drivers/MtxOrb.c index cb00194..4515b56 100644 --- a/server/drivers/MtxOrb.c +++ b/server/drivers/MtxOrb.c @@ -304,10 +304,10 @@ void MtxOrb_output (int on) { char out[4]; - if (on) { + if (on > 0) { sprintf (out, "%cW", 254); write (fd, out, 2); - } else { + } else if (on < 0) { sprintf (out, "%cV", 254); write (fd, out, 2); } @@ -573,17 +573,16 @@ MtxOrb_draw_frame (char *dat) if (!dat) return; - +/* sprintf(out, "%cG%c%c", 254, 1, 1); write(fd, out, 4); write(fd, dat, lcd.wid*lcd.hgt); -/* +*/ for (i = 0; i < lcd.hgt; i++) { sprintf (out, "%cG%c%c", 254, 1, i + 1); write (fd, out, 4); write (fd, dat + (lcd.wid * i), lcd.wid); } -*/ } /////////////////////////////////////////////////////////////