Another attempt to fix the MtxOrb weirdness. Changed the general-purpose
output so it doesn't send anything unless something actually happened.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user