Skip to content

Commit 15e7888

Browse files
committed
Fix HITS logging logic.
1 parent 00a183a commit 15e7888

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

fw/AIRDOS04/AIRDOS04.ino

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,15 +1123,13 @@ void loop()
11231123
}
11241124
else
11251125
{
1126-
if (hit_count < EVENTS)
1127-
{
1128-
readRTC();
1126+
readRTC();
11291127

1130-
hit_time[hit_count] = tm;
1131-
hit_time_s100[hit_count]=tm_s100;
1132-
hit_channel[hit_count] = adcVal;
1133-
}
1134-
logHits();
1128+
hit_time[hit_count] = tm;
1129+
hit_time_s100[hit_count]=tm_s100;
1130+
hit_channel[hit_count] = adcVal;
1131+
1132+
if (hit_count >= (EVENTS-1)) logHits(); // log HITS message in case the EVENTS count is reached.
11351133
}
11361134
digitalWrite(DRESET, HIGH);
11371135

0 commit comments

Comments
 (0)