We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7597b4f commit cf447a5Copy full SHA for cf447a5
Marlin/src/feature/cooler.h
@@ -78,10 +78,8 @@ class Cooler {
78
79
// Get the total flow (in liters per minute) since the last reading
80
static void calc_flowrate() {
81
- //flowmeter_interrupt_disable();
82
- // const uint16_t pulses = flowpulses;
83
- //flowmeter_interrupt_enable();
84
- flowrate = flowpulses * 60.0f * (1000.0f / (FLOWMETER_INTERVAL)) * (1000.0f / (FLOWMETER_PPL));
+ // flowrate = (litres) * (seconds) = litres per minute
+ flowrate = (flowpulses / (float)FLOWMETER_PPL) * ((1000.0f / (float)FLOWMETER_INTERVAL) * 60.0f);
85
flowpulses = 0;
86
}
87
0 commit comments