mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Merge branch 'node-uldaq' of git.rwth-aachen.de:acs/public/villas/VILLASnode into node-uldaq
This commit is contained in:
commit
d4371d5bae
1 changed files with 4 additions and 2 deletions
|
@ -221,7 +221,7 @@ int uldaq_start(struct node *n)
|
|||
ulAInScanStatus(u->device_handle, &status, &transferStatus);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int uldaq_stop(struct node *n)
|
||||
|
@ -231,6 +231,7 @@ int uldaq_stop(struct node *n)
|
|||
|
||||
UlError err = ERR_NO_ERROR;
|
||||
ScanStatus status;
|
||||
TransferStatus transferStatus;
|
||||
// get the current status of the acquisition
|
||||
err = ulAInScanStatus(u->device_handle, &status, &transferStatus);
|
||||
|
||||
|
@ -252,11 +253,12 @@ int uldaq_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re
|
|||
|
||||
UlError err = ERR_NO_ERROR;
|
||||
ScanStatus status;
|
||||
TransferStatus transferStatus;
|
||||
// get the current status of the acquisition
|
||||
err = ulAInScanStatus(u->device_handle, &status, &transferStatus);
|
||||
if (status == SS_RUNNING && err == ERR_NO_ERROR) {
|
||||
if (err == ERR_NO_ERROR) {
|
||||
index = transferStatus.currentIndex;
|
||||
int index = transferStatus.currentIndex;
|
||||
int i=0;//we only read one channel
|
||||
double currentVal = u->in.buffer[index + i];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue