aboutsummaryrefslogtreecommitdiff
path: root/libarmep/sample.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarmep/sample.c')
-rw-r--r--libarmep/sample.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libarmep/sample.c b/libarmep/sample.c
index f17a803..df6b278 100644
--- a/libarmep/sample.c
+++ b/libarmep/sample.c
@@ -90,8 +90,8 @@ int process_sample(struct aep *aep, int ch_index)
struct aep_channel *ch = &aep->ch[ch_index], *ich;
double v1, v2, v1a, v2a, vo0 = 0, vo1 = 0;
int m, i, from_pretrig = 0, n, hit;
- struct aep_shared *aep_shared;
- struct aep_result *aep_result;
+ struct aepd_interface *aepd_interface;
+ struct aepd_interface_result *aepd_interface_result;
if (!aep->aep_context->no_correction) {
vo0 = ch->voffset[0];
@@ -302,12 +302,12 @@ unripe:
/* if so, output it all together */
- aep_shared = aep->aep_context->aep_shared;
- aep_result = &aep_shared->aep_result[aep_shared->head];
+ aepd_interface = aep->aep_context->aepd_interface;
+ aepd_interface_result = &aepd_interface->aepd_interface_result[aepd_interface->head];
- aep_result->triggered = ch->triggered;
- aep_result->chans = hit;
- aep_result->samtime = ((double)ch->samples_seen - (double)ch->ring_samples) / 10000.0;
+ aepd_interface_result->triggered = ch->triggered;
+ aepd_interface_result->chans = hit;
+ aepd_interface_result->samtime = ((double)ch->samples_seen - (double)ch->ring_samples) / 10000.0;
n = 0;
@@ -332,17 +332,17 @@ unripe:
if (!ich->requested)
continue;
- aep_result->buf[n++] = v1a;
- aep_result->buf[n++] = v2a;
+ aepd_interface_result->buf[n++] = v1a;
+ aepd_interface_result->buf[n++] = v2a;
}
}
- if (aep_shared->head == (sizeof(aep_shared->aep_result) / sizeof(aep_shared->aep_result[0])) - 1)
- aep_shared->head = 0;
+ if (aepd_interface->head == (sizeof(aepd_interface->aepd_interface_result) / sizeof(aepd_interface->aepd_interface_result[0])) - 1)
+ aepd_interface->head = 0;
else
- aep_shared->head++;
+ aepd_interface->head++;
- if (sem_post(aep->aep_context->semaphore) < 0)
+ if (sem_post(aep->aep_context->aepd_interface->semaphore) < 0)
fprintf(stderr, "failed to set semaphore\n");
done: