From 0a19109476fd9053a0e13df191342bc3604076de Mon Sep 17 00:00:00 2001
From: kieranc <kieranc@gmail.com>
Date: Tue, 10 Feb 2015 14:11:44 +0100
Subject: [PATCH] Enable PID debugging for heated bed

---
 Marlin/temperature.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp
index 9889e1fda5..6289288b45 100644
--- a/Marlin/temperature.cpp
+++ b/Marlin/temperature.cpp
@@ -647,6 +647,20 @@ void manage_heater()
     #else 
       pid_output = constrain(target_temperature_bed, 0, MAX_BED_POWER);
     #endif //PID_OPENLOOP
+        #ifdef PID_BED_DEBUG
+    SERIAL_ECHO_START;
+    SERIAL_ECHO(" PID_BED_DEBUG ");
+    SERIAL_ECHO(": Input ");
+    SERIAL_ECHO(pid_input);
+    SERIAL_ECHO(" Output ");
+    SERIAL_ECHO(pid_output);
+    SERIAL_ECHO(" pTerm ");
+    SERIAL_ECHO(pTerm_bed);
+    SERIAL_ECHO(" iTerm ");
+    SERIAL_ECHO(iTerm_bed);
+    SERIAL_ECHO(" dTerm ");
+    SERIAL_ECHOLN(dTerm_bed);
+    #endif //PID_BED_DEBUG
 
 	  if((current_temperature_bed > BED_MINTEMP) && (current_temperature_bed < BED_MAXTEMP)) 
 	  {
-- 
GitLab