|
|
@ -78,10 +78,8 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
// Get the total flow (in liters per minute) since the last reading
|
|
|
|
// Get the total flow (in liters per minute) since the last reading
|
|
|
|
static void calc_flowrate() {
|
|
|
|
static void calc_flowrate() {
|
|
|
|
//flowmeter_interrupt_disable();
|
|
|
|
// flowrate = (litres) * (seconds) = litres per minute
|
|
|
|
// const uint16_t pulses = flowpulses;
|
|
|
|
flowrate = (flowpulses / (float)FLOWMETER_PPL) * ((1000.0f / (float)FLOWMETER_INTERVAL) * 60.0f);
|
|
|
|
//flowmeter_interrupt_enable();
|
|
|
|
|
|
|
|
flowrate = flowpulses * 60.0f * (1000.0f / (FLOWMETER_INTERVAL)) * (1000.0f / (FLOWMETER_PPL));
|
|
|
|
|
|
|
|
flowpulses = 0;
|
|
|
|
flowpulses = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|