Browse Source

Changed output format so that numbers are between 0 and 65536 instead of

signed output. This matches LabJack behavior


git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@7141 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/ethstream-1.1
zacharyc 15 years ago
parent
commit
57cfac2bec
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      nerdjack.c

+ 4
- 3
nerdjack.c View File

@@ -131,7 +131,7 @@ int nerd_data_stream(int data_fd, char * command, int numChannels, int *channel_
int ret = 0;
int alignment = 0;
signed short datapoint = 0;
signed short dataline[NERDJACK_CHANNELS];
unsigned short dataline[NERDJACK_CHANNELS];
long double voltline[NERDJACK_CHANNELS];
deststruct destination[NERDJACK_CHANNELS];
int tempdestlist[NERDJACK_CHANNELS];
@@ -247,7 +247,8 @@ int nerd_data_stream(int data_fd, char * command, int numChannels, int *channel_
}
} else {
for(i = 0; i < destination[alignment].numCopies; i++) {
dataline[destination[alignment].destlist[i]] = datapoint;
dataline[destination[alignment].destlist[i]] =
(unsigned short) (datapoint - INT16_MIN);
}
}
@@ -268,7 +269,7 @@ int nerd_data_stream(int data_fd, char * command, int numChannels, int *channel_
}
} else {
for(i = 0; i < numChannels; i++) {
printf("%hd ",dataline[i]);
printf("%hu ",dataline[i]);
}
}
printf("\n");


Loading…
Cancel
Save