Applied patches supplied by Andre' Breiler:

- bugfixes for display != MatrixOrb LCD
	- changes the meaning of output_state
		+ it's now a bitfield where evry bit corresponds to
		  one output
	- protocol change
		output on|off|value
		where on    = all outputs on
		      off   = all outputs off
		      value = output on for all 1 bits
	- changes the behavior for key presses
	  Keypresses are now deliverd to _all_ clients (not only
	  the one with the active screen)
	reason: I have an client which is only active a few seconds after
                an keypress
	- changes the protocol so that a response is sent for every
	  command
	reason: the client needs to communicate with the server with a
                minimal latency
This commit is contained in:
William Ferrell
2001-03-22 22:51:49 +00:00
parent 5cc0287cff
commit 6dabd0b8f3
9 changed files with 131 additions and 60 deletions
+1
View File
@@ -49,6 +49,7 @@ while(1)
@lines = split(/\n/, $input);
foreach $line (@lines)
{
if ( $line =~ /^success$/ ) next;
if($line =~ /^ignore (\S)/) # Update just after disappearing
{
&update_text();
+1
View File
@@ -43,6 +43,7 @@ while(1)
#print "Main loop...\n";
# Handle input... (just spew it to the console)
while(defined($line = <$remote>)) {
if ( $line =~ /^success$/ ) next;
print $line;
}
+1
View File
@@ -58,6 +58,7 @@ while(1)
# Handle input... (spew it to the console)
# Also, certain keys scroll the display
while(defined($input = <$remote>)) {
if ( $input =~ /^success$/ ) next;
print $input;
$slow = -10;
+3
View File
@@ -72,6 +72,9 @@ while(1)
elsif($command eq "ignore")
{
}
elsif($command eq "success")
{
}
else {
if($line =~ /\S/) {print "Huh? $line\n";}
}
+1
View File
@@ -285,6 +285,7 @@ main_loop (mode * sequence)
} else if (0 == strcmp (argv[0], "bye")) {
//printf("Exiting LCDproc\n");
exit_program (0);
} else if (0 == strcmp (argv[0], "success")) {
} else {
int j;
for (j = 0; j < argc; j++)
+5
View File
@@ -148,6 +148,11 @@ while (1==1) {
# print "The wind blows to $wind_dir_eng, speed $wind_mph mph\n";
} # end else
# eat all input from LCDd
while(defined($input = <$remote>)) {
if ( $input =~ /^success$/ ) next;
#print $input;
}
print "Sleeping 15 minutes.\n";
sleep 900;
}