Selaa lähdekoodia

Heater wattage reporting for M105 using EXTRUDER_WATTS and BED_WATTS

David Forrest 10 vuotta sitten
vanhempi
commit
a5f53f0cf3
2 muutettua tiedostoa jossa 14 lisäystä ja 0 poistoa
  1. 4
    0
      Marlin/Configuration.h
  2. 10
    0
      Marlin/Marlin_main.cpp

+ 4
- 0
Marlin/Configuration.h Näytä tiedosto

@@ -156,6 +156,10 @@
156 156
 // HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
157 157
 //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
158 158
 
159
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS 
160
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R 
161
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
162
+
159 163
 // PID settings:
160 164
 // Comment the following line to disable PID and enable bang-bang.
161 165
 #define PIDTEMP

+ 10
- 0
Marlin/Marlin_main.cpp Näytä tiedosto

@@ -1816,10 +1816,20 @@ void process_commands()
1816 1816
       #endif
1817 1817
 
1818 1818
         SERIAL_PROTOCOLPGM(" @:");
1819
+      #ifdef EXTRUDER_WATTS
1820
+        SERIAL_PROTOCOL((EXTRUDER_WATTS * getHeaterPower(tmp_extruder))/127);
1821
+        SERIAL_PROTOCOLPGM("W");
1822
+      #else
1819 1823
         SERIAL_PROTOCOL(getHeaterPower(tmp_extruder));
1824
+      #endif
1820 1825
 
1821 1826
         SERIAL_PROTOCOLPGM(" B@:");
1827
+      #ifdef BED_WATTS
1828
+        SERIAL_PROTOCOL((BED_WATTS * getHeaterPower(-1))/127);
1829
+        SERIAL_PROTOCOLPGM("W");
1830
+      #else
1822 1831
         SERIAL_PROTOCOL(getHeaterPower(-1));
1832
+      #endif
1823 1833
 
1824 1834
         #ifdef SHOW_TEMP_ADC_VALUES
1825 1835
           #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1

Loading…
Peruuta
Tallenna