From bdfc7a89745a0fae422806c883cbd946f16eace3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Espeland?= Date: Mon, 3 May 2010 21:35:02 +0200 Subject: [PATCH] Sigma: Small cleanups. --- hardware/asix-sigma/asix-sigma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 18664829..05467824 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -747,8 +747,8 @@ static int get_trigger_offset(uint16_t *samples, uint16_t last_sample, continue; /* Falling edge. */ - if ((last_sample & t->fallingmask) != t->fallingmask || (samples[i] & - t->fallingmask) != 0) + if ((last_sample & t->fallingmask) != t->fallingmask || + (samples[i] & t->fallingmask) != 0) continue; break; @@ -779,14 +779,11 @@ static int decode_chunk_ts(uint8_t *buf, uint16_t *lastts, uint16_t *event; uint16_t cur_sample; int triggerts = -1; - int triggeroff = 0; /* Check if trigger is in this chunk. */ if (triggerpos != -1) { if (cur_samplerate <= MHZ(50)) triggerpos -= EVENTS_PER_CLUSTER - 1; - else - triggeroff = 3; if (triggerpos < 0) triggerpos = 0; @@ -853,7 +850,8 @@ static int decode_chunk_ts(uint8_t *buf, uint16_t *lastts, * the actual event. We therefore look at the next * samples to pinpoint the exact position of the trigger. */ - tosend = get_trigger_offset(samples, *lastsample, &trigger); + tosend = get_trigger_offset(samples, *lastsample, + &trigger); if (tosend > 0) { packet.type = DF_LOGIC16;