Commit 2e3f2f4b by zacharyc

Made ethstream reset a little easier.


git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@7426 ddd99763-3ecb-0310-9145-efcb8ce7c51f
parent 4592b6a7
Showing with 2 additions and 1 deletions
...@@ -424,6 +424,7 @@ nerdDoStream (const char *address, int *channel_list, int channel_count, ...@@ -424,6 +424,7 @@ nerdDoStream (const char *address, int *channel_list, int channel_count,
static int wasreset = 0; static int wasreset = 0;
getPacket command; getPacket command;
static unsigned short currentcount = 0; static unsigned short currentcount = 0;
tryagain:
//If this is the first time, set up acquisition //If this is the first time, set up acquisition
//Otherwise try to resume the previous one //Otherwise try to resume the previous one
...@@ -465,7 +466,7 @@ nerdDoStream (const char *address, int *channel_list, int channel_count, ...@@ -465,7 +466,7 @@ nerdDoStream (const char *address, int *channel_list, int channel_count,
currentcount = 0; currentcount = 0;
started = 0; started = 0;
wasreset = 1; wasreset = 1;
goto out; goto tryagain;
} else if(retval < 0) { } else if(retval < 0) {
info ("Failed to send SETC command\n"); info ("Failed to send SETC command\n");
goto out; goto out;
......
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