From a5f53f0cf31fe8650ea25e274ee6b206ff01d930 Mon Sep 17 00:00:00 2001
From: David Forrest <drf@vims.edu>
Date: Mon, 3 Feb 2014 14:46:09 -0500
Subject: [PATCH] Heater wattage reporting for M105 using EXTRUDER_WATTS and
 BED_WATTS

---
 Marlin/Configuration.h |  4 ++++
 Marlin/Marlin_main.cpp | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 1da62fc2ad8..fe03e031867 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -156,6 +156,10 @@
 // HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
 //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
 
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS 
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R 
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
+
 // PID settings:
 // Comment the following line to disable PID and enable bang-bang.
 #define PIDTEMP
diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index d33f0ff5480..aecaf1275b3 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -1816,10 +1816,20 @@ void process_commands()
       #endif
 
         SERIAL_PROTOCOLPGM(" @:");
+      #ifdef EXTRUDER_WATTS
+        SERIAL_PROTOCOL((EXTRUDER_WATTS * getHeaterPower(tmp_extruder))/127);
+        SERIAL_PROTOCOLPGM("W");
+      #else
         SERIAL_PROTOCOL(getHeaterPower(tmp_extruder));
+      #endif
 
         SERIAL_PROTOCOLPGM(" B@:");
+      #ifdef BED_WATTS
+        SERIAL_PROTOCOL((BED_WATTS * getHeaterPower(-1))/127);
+        SERIAL_PROTOCOLPGM("W");
+      #else
         SERIAL_PROTOCOL(getHeaterPower(-1));
+      #endif
 
         #ifdef SHOW_TEMP_ADC_VALUES
           #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1