disable request
This commit is contained in:
parent
7aa21c4e4f
commit
3a7fd4a501
17
src/mbusgw.c
17
src/mbusgw.c
@ -477,12 +477,6 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
|
||||
while (1) {
|
||||
if (! loopActiveFlag) {
|
||||
errlog("loop is not active, enable it and delay\n");
|
||||
loopControl(true);
|
||||
msleep(2000);
|
||||
}
|
||||
|
||||
if (lineMode) {
|
||||
infolog("lineMode, waiting for input\n");
|
||||
fread(&cmd, 1, 1, stdin);
|
||||
@ -492,6 +486,17 @@ int main(int argc, char *argv[]) {
|
||||
errlog("termination requested\n");
|
||||
break;
|
||||
}
|
||||
if ((cmd == 0) && (addr == 1)) {
|
||||
errlog("loop shutdown requested\n");
|
||||
loopControl(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! loopActiveFlag) {
|
||||
errlog("loop is not active, enable it and delay\n");
|
||||
loopControl(true);
|
||||
msleep(2000);
|
||||
}
|
||||
|
||||
infolog("sending request %02x %02x\n", cmd, addr);
|
||||
t_longframe *frame = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user