Other fix

parent 873d87e8
...@@ -5758,7 +5758,7 @@ inline void gcode_M104() { ...@@ -5758,7 +5758,7 @@ inline void gcode_M104() {
inline void gcode_M105() { inline void gcode_M105() {
if (setTargetedExtruder(105)) return; if (setTargetedExtruder(105)) return;
#if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675) || HAS(TEMP_COOLER) #if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675) || HAS(TEMP_COOLER) || ENABLED(FLOWMETER_SENSOR)
ECHO_S(OK); ECHO_S(OK);
#if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675) #if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675)
print_heaterstates(); print_heaterstates();
...@@ -5766,7 +5766,7 @@ inline void gcode_M105() { ...@@ -5766,7 +5766,7 @@ inline void gcode_M105() {
#if HAS(TEMP_COOLER) #if HAS(TEMP_COOLER)
print_coolerstates(); print_coolerstates();
#endif #endif
#if HAS(FLOWMETER_SENSOR) #if ENABLED(FLOWMETER_SENSOR)
print_flowratestates(); print_flowratestates();
#endif #endif
#else // HASNT(TEMP_0) && HASNT(TEMP_BED) #else // HASNT(TEMP_0) && HASNT(TEMP_BED)
...@@ -9253,10 +9253,10 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -9253,10 +9253,10 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
#if ENABLED(FLOWMETER_SENSOR) && ENABLED(MINFLOW_PROTECTION) #if ENABLED(FLOWMETER_SENSOR) && ENABLED(MINFLOW_PROTECTION)
if (get_flowrate() < (MINFLOW_PROTECTION*1000)) { if (get_flowrate() < (MINFLOW_PROTECTION*1000)) {
if (IsRunning()) if (Printing)
kill(PSTR(MSG_KILLED)); kill(PSTR(MSG_KILLED));
else //else
stop(); // stop();
} }
#endif #endif
......
...@@ -47,7 +47,7 @@ void flowrate_manage() { ...@@ -47,7 +47,7 @@ void flowrate_manage() {
detachInterrupt(digitalPinToInterrupt(FLOWMETER_PIN)); detachInterrupt(digitalPinToInterrupt(FLOWMETER_PIN));
flowrate = ((1000.0 / (now - flowmeter_timer)) * flowrate_pulsecount) / FLOWMETER_CALIBRATION; flowrate = ((1000.0 / (now - flowmeter_timer)) * flowrate_pulsecount) / FLOWMETER_CALIBRATION;
flowmeter_timer = now + 1000UL; flowmeter_timer = now + 1000UL;
flowml = (flowrate / 60) * 1000; flowml = (flowrate / 60.0) * 1000;
flowrate_pulsecount = 0; flowrate_pulsecount = 0;
attachInterrupt(digitalPinToInterrupt(FLOWMETER_PIN), flowrate_pulsecounter, FALLING); attachInterrupt(digitalPinToInterrupt(FLOWMETER_PIN), flowrate_pulsecounter, FALLING);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment