Made ethstream reset a little easier.

git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@7426 ddd99763-3ecb-0310-9145-efcb8ce7c51f
This commit is contained in:
zacharyc 2009-04-10 20:35:36 +00:00
parent 4592b6a75b
commit 2e3f2f4b23

View File

@ -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,
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;