mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-08 11:44:01 +02:00
Fix manual status change desyncing arduino
This commit is contained in:
parent
beb0118ded
commit
e3935c031e
1 changed files with 2 additions and 2 deletions
|
@ -116,7 +116,7 @@ sub _start {
|
||||||
Handle => serial_open($devdoor),
|
Handle => serial_open($devdoor),
|
||||||
Filter => POE::Filter::Line->new(
|
Filter => POE::Filter::Line->new(
|
||||||
InputLiteral => "\x0A", # Received line endings.
|
InputLiteral => "\x0A", # Received line endings.
|
||||||
OutputLiteral => "\x0A", # Sent line endings.
|
OutputLiteral => "", # Sent line endings.
|
||||||
),
|
),
|
||||||
InputEvent => "serial_input",
|
InputEvent => "serial_input",
|
||||||
ErrorEvent => "serial_error",
|
ErrorEvent => "serial_error",
|
||||||
|
@ -396,7 +396,7 @@ sub web_brmstatus_switch {
|
||||||
my $q = new CGI($request->content);
|
my $q = new CGI($request->content);
|
||||||
my $nick = $q->param('nick');
|
my $nick = $q->param('nick');
|
||||||
|
|
||||||
my $newstatus = not $status;
|
my $newstatus = 0 + not $status;
|
||||||
foreach (@{$self->{observers}}) {
|
foreach (@{$self->{observers}}) {
|
||||||
$poe_kernel->post($_, 'status_update', $newstatus, 'web', $nick);
|
$poe_kernel->post($_, 'status_update', $newstatus, 'web', $nick);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue