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