소스 검색

Merge pull request #744 from drf5n/watts

Heater wattage reporting for M105 using EXTRUDER_WATTS and BED_WATTS
ErikZalm 10 년 전
부모
커밋
1cc9212c05
2개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      Marlin/Configuration.h
  2. 10
    0
      Marlin/Marlin_main.cpp

+ 4
- 0
Marlin/Configuration.h 파일 보기

@@ -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 파일 보기

@@ -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…
취소
저장