climateguard / RadSens

Arduino library for radiation detector module RadSens to simplify integration into compatible platforms.
GNU General Public License v3.0
51 stars 17 forks source link

getNumberOfPulses() always increasing number... #15

Closed earlthesquirrel closed 3 months ago

earlthesquirrel commented 9 months ago

The comment in the code says:

Returns the accumulated number of pulses registered by the module since the last I2C data reading

But in practice, running the test code, it is an ever increasing number. Is there some way to cause it to reset?

climateguard commented 9 months ago

Good afternoon, yes, library use _pulscnt to store pulses. You can get current pulses. You need to change method update_pulses() and change getNumberOfPulses() inside the cpp file to return the current i2c values. Is it will be a problem for you?

earlthesquirrel commented 9 months ago

Yeah, I can make those additions. Thanks for the description... I looked at the code and see what needs to change...