Skip to content

Commit

Permalink
Merge pull request #9 from puuu/setup
Browse files Browse the repository at this point in the history
Initialize all history related variables in setup()
  • Loading branch information
MonsieurV authored Mar 18, 2017
2 parents dbb8783 + 8b4eb88 commit 67ce91e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=RadiationWatch
version=0.6.0
version=0.6.1
author=puuu, thomasaw, Tourmal, Yoan Tournade <[email protected]>
maintainer=Yoan Tournade <[email protected]>
sentence=Arduino driver for Radiation Watch Pocket Geiger sensor
Expand Down
3 changes: 3 additions & 0 deletions src/RadiationWatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ void RadiationWatch::setup()
// Initialize _countHistory[].
for(int i = 0; i < HISTORY_LENGTH; i++)
_countHistory[i] = 0;
_count = 0;
historyIndex = 0;
historyLength = 0;
// Init measurement time.
previousTime = millis();
previousHistoryTime = millis();
Expand Down

0 comments on commit 67ce91e

Please sign in to comment.