Commit 5b731f3e by zacharyc

Now ethstream falls back from Labjack to Nerdjack


git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@7140 ddd99763-3ecb-0310-9145-efcb8ce7c51f
parent 4524f534
Showing with 8 additions and 0 deletions
...@@ -197,6 +197,8 @@ int main(int argc, char *argv[]) ...@@ -197,6 +197,8 @@ int main(int argc, char *argv[])
} }
} }
doneparse:
if (nerdjack) { if (nerdjack) {
if (channel_count > NERDJACK_CHANNELS) { if (channel_count > NERDJACK_CHANNELS) {
info("Too many channels for NerdJack\n"); info("Too many channels for NerdJack\n");
...@@ -302,6 +304,12 @@ int main(int argc, char *argv[]) ...@@ -302,6 +304,12 @@ int main(int argc, char *argv[])
if (ret == 0) if (ret == 0)
break; break;
if (ret == -ENOTCONN && !nerdjack) {
info("Could not connect LabJack...Trying NerdJack\n");
nerdjack = 1;
goto doneparse;
}
if (ret == -ENOTCONN && !forceretry) { if (ret == -ENOTCONN && !forceretry) {
info("Initial connection failed, giving up\n"); info("Initial connection failed, giving up\n");
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment