From f6ff0ab767c8b05a36e14275fbeb4ee3254efd98 Mon Sep 17 00:00:00 2001
From: daid303 <daid303@gmail.com>
Date: Tue, 6 Nov 2012 15:33:49 +0100
Subject: [PATCH] signed/unsigned fixes.

---
 Marlin/Configuration_adv.h |  4 ++--
 Marlin/ultralcd.cpp        | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index 0d69405545..e7fdbe5713 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -179,7 +179,7 @@
 
 
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // no z because of layer shift.
+#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
 
 // The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
 //#define USE_WATCHDOG
@@ -188,7 +188,7 @@
 // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
 // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
 //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
-#define WATCHDOG_RESET_MANUAL
+//#define WATCHDOG_RESET_MANUAL
 #endif
 
 // extruder advance constant (s2/mm3)
diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp
index 6245e728dd..a7fd12cead 100644
--- a/Marlin/ultralcd.cpp
+++ b/Marlin/ultralcd.cpp
@@ -53,9 +53,9 @@ static unsigned long previous_millis_lcd=0;
 
 
 #ifdef NEWPANEL
- static long blocking=0;
+ static unsigned long blocking=0;
 #else
- static long blocking[8]={0,0,0,0,0,0,0,0};
+ static unsigned long blocking[8]={0,0,0,0,0,0,0,0};
 #endif
  
 static MainMenu menu;
@@ -225,7 +225,7 @@ void lcd_status()
     //static long previous_lcdinit=0;
   //  buttons_check(); // Done in temperature interrupt
     //previous_millis_buttons=millis();
-    long ms=millis();
+    unsigned long ms=millis();
     for(int8_t i=0; i<8; i++) {
       #ifndef NEWPANEL
       if((blocking[i]>ms))
@@ -2365,7 +2365,7 @@ void MainMenu::showSD()
           card.getfilename(i-FIRSTITEM);
           if(card.filenameIsDir)
           {
-            for(int8_t i=0;i<strlen(card.filename);i++)
+            for(uint8_t i=0;i<strlen(card.filename);i++)
               card.filename[i]=tolower(card.filename[i]);
             card.chdir(card.filename);
             lineoffset=0;
@@ -2374,7 +2374,7 @@ void MainMenu::showSD()
           else
           {
             char cmd[30];
-            for(int8_t i=0;i<strlen(card.filename);i++)
+            for(uint8_t i=0;i<strlen(card.filename);i++)
               card.filename[i]=tolower(card.filename[i]);
             sprintf(cmd,"M23 %s",card.filename);
             //sprintf(cmd,"M115");
@@ -2549,7 +2549,7 @@ void MainMenu::showMainMenu()
 void MainMenu::update()
 {
   static MainStatus oldstatus=Main_Menu;  //init automatically causes foce_lcd_update=true
-  static long timeoutToStatus=0;
+  static unsigned long timeoutToStatus=0;
   static bool oldcardstatus=false;
   #ifdef CARDINSERTED
     if((CARDINSERTED != oldcardstatus))