signed/unsigned fixes.

master
daid303 12 years ago
parent 5d471e0f34
commit f6ff0ab767

@ -179,7 +179,7 @@
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? #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. // 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 //#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. // 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. // 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. // 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 #endif
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

@ -53,9 +53,9 @@ static unsigned long previous_millis_lcd=0;
#ifdef NEWPANEL #ifdef NEWPANEL
static long blocking=0; static unsigned long blocking=0;
#else #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 #endif
static MainMenu menu; static MainMenu menu;
@ -225,7 +225,7 @@ void lcd_status()
//static long previous_lcdinit=0; //static long previous_lcdinit=0;
// buttons_check(); // Done in temperature interrupt // buttons_check(); // Done in temperature interrupt
//previous_millis_buttons=millis(); //previous_millis_buttons=millis();
long ms=millis(); unsigned long ms=millis();
for(int8_t i=0; i<8; i++) { for(int8_t i=0; i<8; i++) {
#ifndef NEWPANEL #ifndef NEWPANEL
if((blocking[i]>ms)) if((blocking[i]>ms))
@ -2365,7 +2365,7 @@ void MainMenu::showSD()
card.getfilename(i-FIRSTITEM); card.getfilename(i-FIRSTITEM);
if(card.filenameIsDir) 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.filename[i]=tolower(card.filename[i]);
card.chdir(card.filename); card.chdir(card.filename);
lineoffset=0; lineoffset=0;
@ -2374,7 +2374,7 @@ void MainMenu::showSD()
else else
{ {
char cmd[30]; 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]); card.filename[i]=tolower(card.filename[i]);
sprintf(cmd,"M23 %s",card.filename); sprintf(cmd,"M23 %s",card.filename);
//sprintf(cmd,"M115"); //sprintf(cmd,"M115");
@ -2549,7 +2549,7 @@ void MainMenu::showMainMenu()
void MainMenu::update() void MainMenu::update()
{ {
static MainStatus oldstatus=Main_Menu; //init automatically causes foce_lcd_update=true 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; static bool oldcardstatus=false;
#ifdef CARDINSERTED #ifdef CARDINSERTED
if((CARDINSERTED != oldcardstatus)) if((CARDINSERTED != oldcardstatus))

Loading…
Cancel
Save