Comments (6)
This behaviour is by design, see #1 .
The reset functionality should not void total volume count, because a meter should be tamper proof.
If you want to reinitialize the meter, please do so by explicitly setting the values (see #1).
If you think that this should be improved, please give some context and insight.
from flowmeter.
void FlowMeter::reset() {
cli(); //!< going to change interrupt variable(s)
this->_currentPulses = 0; //!< reset pulse counter
sei(); //!< done changing interrupt variable(s)
this->_totalVolume = 0.0f; //just added this line now works as expected
this->_currentFrequency = 0.0f;
i added one line at above fuction now works as expected by me
from flowmeter.
Yes, as I mentioned above, this possibility was discussed in #1.
But do you think this is a feature that's missing in the library?
If so, why?
from flowmeter.
When we call reset() function in setup function it work like charm.
I use reset() function in loop with if statement ,to trigger relay on or off based on total volume despensed from trigger.
Then I use reset() function. Which reset all current volume not totalvalume.
Total volume count remains as privous value.
from flowmeter.
Actually, that's what current volume
is intended for.
The difference between current volume
and total volume
is that the former is resettable, the latter is not.
This is by design.
If you intend to trigger a relay based on volume since last reset, isn't that current volume
?
In other words: isn't your modification unifying current
and total
volumes, just making them identical all the time?
from flowmeter.
Closed due to inactivity.
from flowmeter.
Related Issues (20)
- Provide example and explanation about non-blocking scheduling. HOT 1
- How I can change sensor properties in execution Time(In Setup or loop) HOT 4
- Software Debounce HOT 2
- How to place your M-Factor Values right in the String ? HOT 3
- This library does not work on STM32F103C8T6.. HOT 1
- ESP32 example HOT 1
- Verify sensor calibration value HOT 8
- Question on Digiten G1 - Probably FS400A HOT 6
- Question: Using this with WM-PD Water Meter HOT 10
- .getCurrentVolume reset every request HOT 3
- Support for Arduino Uno Wifi Rev2 HOT 2
- problem with library HOT 6
- Gicar flowmeter unstable doses HOT 7
- Question about the sensor fm-hl3012 HOT 22
- YF-B5 unstable pulses, huge difference between actual and nominal values HOT 18
- YF-DN32 HOT 12
- Split up flow sensor and flow meter into different classes and files. HOT 3
- Improve support of saving and restoring to memory HOT 2
- Improve measurement timing in order to further reduce systematic error. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowmeter.