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:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -72,6 +72,9 @@ while(1)
|
||||
elsif($command eq "ignore")
|
||||
{
|
||||
}
|
||||
elsif($command eq "success")
|
||||
{
|
||||
}
|
||||
else {
|
||||
if($line =~ /\S/) {print "Huh? $line\n";}
|
||||
}
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user