Browse Source

signed/unsigned fixes.

daid303 12 years ago
parent
commit
f6ff0ab767
2 changed files with 8 additions and 8 deletions
  1. 2
    2
      Marlin/Configuration_adv.h
  2. 6
    6
      Marlin/ultralcd.cpp

+ 2
- 2
Marlin/Configuration_adv.h View File

179
 
179
 
180
 
180
 
181
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
181
 #define SD_FINISHED_STEPPERRELEASE true  //if sd support and the file is finished: disable steppers?
182
-#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // no z because of layer shift.
182
+#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
183
 
183
 
184
 // The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
184
 // The hardware watchdog should reset the Microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
185
 //#define USE_WATCHDOG
185
 //#define USE_WATCHDOG
188
 // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
188
 // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
189
 // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
189
 // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
190
 //  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.
190
 //  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.
191
-#define WATCHDOG_RESET_MANUAL
191
+//#define WATCHDOG_RESET_MANUAL
192
 #endif
192
 #endif
193
 
193
 
194
 // extruder advance constant (s2/mm3)
194
 // extruder advance constant (s2/mm3)

+ 6
- 6
Marlin/ultralcd.cpp View File

53
 
53
 
54
 
54
 
55
 #ifdef NEWPANEL
55
 #ifdef NEWPANEL
56
- static long blocking=0;
56
+ static unsigned long blocking=0;
57
 #else
57
 #else
58
- static long blocking[8]={0,0,0,0,0,0,0,0};
58
+ static unsigned long blocking[8]={0,0,0,0,0,0,0,0};
59
 #endif
59
 #endif
60
  
60
  
61
 static MainMenu menu;
61
 static MainMenu menu;
225
     //static long previous_lcdinit=0;
225
     //static long previous_lcdinit=0;
226
   //  buttons_check(); // Done in temperature interrupt
226
   //  buttons_check(); // Done in temperature interrupt
227
     //previous_millis_buttons=millis();
227
     //previous_millis_buttons=millis();
228
-    long ms=millis();
228
+    unsigned long ms=millis();
229
     for(int8_t i=0; i<8; i++) {
229
     for(int8_t i=0; i<8; i++) {
230
       #ifndef NEWPANEL
230
       #ifndef NEWPANEL
231
       if((blocking[i]>ms))
231
       if((blocking[i]>ms))
2365
           card.getfilename(i-FIRSTITEM);
2365
           card.getfilename(i-FIRSTITEM);
2366
           if(card.filenameIsDir)
2366
           if(card.filenameIsDir)
2367
           {
2367
           {
2368
-            for(int8_t i=0;i<strlen(card.filename);i++)
2368
+            for(uint8_t i=0;i<strlen(card.filename);i++)
2369
               card.filename[i]=tolower(card.filename[i]);
2369
               card.filename[i]=tolower(card.filename[i]);
2370
             card.chdir(card.filename);
2370
             card.chdir(card.filename);
2371
             lineoffset=0;
2371
             lineoffset=0;
2374
           else
2374
           else
2375
           {
2375
           {
2376
             char cmd[30];
2376
             char cmd[30];
2377
-            for(int8_t i=0;i<strlen(card.filename);i++)
2377
+            for(uint8_t i=0;i<strlen(card.filename);i++)
2378
               card.filename[i]=tolower(card.filename[i]);
2378
               card.filename[i]=tolower(card.filename[i]);
2379
             sprintf(cmd,"M23 %s",card.filename);
2379
             sprintf(cmd,"M23 %s",card.filename);
2380
             //sprintf(cmd,"M115");
2380
             //sprintf(cmd,"M115");
2549
 void MainMenu::update()
2549
 void MainMenu::update()
2550
 {
2550
 {
2551
   static MainStatus oldstatus=Main_Menu;  //init automatically causes foce_lcd_update=true
2551
   static MainStatus oldstatus=Main_Menu;  //init automatically causes foce_lcd_update=true
2552
-  static long timeoutToStatus=0;
2552
+  static unsigned long timeoutToStatus=0;
2553
   static bool oldcardstatus=false;
2553
   static bool oldcardstatus=false;
2554
   #ifdef CARDINSERTED
2554
   #ifdef CARDINSERTED
2555
     if((CARDINSERTED != oldcardstatus))
2555
     if((CARDINSERTED != oldcardstatus))

Loading…
Cancel
Save