mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
nodetype:uldaq started integration for example
This commit is contained in:
parent
bb9ef6d234
commit
b139e171f9
1 changed files with 4 additions and 2 deletions
|
@ -211,7 +211,7 @@ int uldaq_start(struct node *n)
|
|||
ulAInScanStatus(u->device_handle, &status, &transferStatus);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int uldaq_stop(struct node *n)
|
||||
|
@ -221,6 +221,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);
|
||||
|
||||
|
@ -242,11 +243,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