Skip to content

Commit

Permalink
Replacing noise variable channel definition with a constant NOISE.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklik committed Jun 16, 2024
1 parent a6b5e80 commit 2544b0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fw/AIRDOS04/AIRDOS04.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#define EVENTS 256 // maximal number of single events detection in memory
#define CHANNELS 64 // number of channels channels in the buffer for histogram
#define NOISE 4 // number of the last histogram channel considered as noise and not counted in to the flux


String FWversion = XSTR(MAJOR)"."XSTR(MINOR)"."XSTR(GHRELEASE)"-"XSTR(GHBUILD)"-"XSTR(GHBUILDTYPE);

Expand Down Expand Up @@ -409,10 +411,9 @@ void DataOut()
digitalWrite(SDpower, HIGH); // SD card power on
digitalWrite(SPI_MUX_SEL, LOW); // SDcard

uint16_t noise = 4;
uint32_t flux=0;

for(uint16_t n=noise; n<(CHANNELS); n++)
for(uint16_t n=NOISE; n<(CHANNELS); n++)
{
flux += histogram[n];
}
Expand Down

0 comments on commit 2544b0d

Please sign in to comment.