Skip to content

Commit

Permalink
The big LCD code update. This splits the display and menu implementat…
Browse files Browse the repository at this point in the history
…ion. Paving the way for future different displays. It also makes it easier to modify the menu structures while keeping everything consistant. Note that this most likely breaks the translations, which need to be updated.
  • Loading branch information
daid committed Dec 12, 2012
1 parent 6731c09 commit 1a8f54c
Show file tree
Hide file tree
Showing 8 changed files with 1,416 additions and 3,075 deletions.
1 change: 0 additions & 1 deletion Marlin/Marlin.h
Expand Up @@ -182,7 +182,6 @@ void setPwmFrequency(uint8_t pin, int val);
extern float homing_feedrate[];
extern bool axis_relative_modes[];
extern int feedmultiply;
extern bool feedmultiplychanged;
extern int extrudemultiply; // Sets extrude multiply factor (in percent)
extern float current_position[NUM_AXIS] ;
extern float add_homeing[3];
Expand Down
3 changes: 1 addition & 2 deletions Marlin/Marlin_main.cpp
Expand Up @@ -147,7 +147,6 @@ CardReader card;
float homing_feedrate[] = HOMING_FEEDRATE;
bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
int feedmultiply=100; //100->1 200->2
bool feedmultiplychanged;
int saved_feedmultiply;
int extrudemultiply=100; //100->1 200->2
float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
Expand Down Expand Up @@ -1372,7 +1371,6 @@ void process_commands()
if(code_seen('S'))
{
feedmultiply = code_value() ;
feedmultiplychanged = true;
}
}
break;
Expand Down Expand Up @@ -1543,6 +1541,7 @@ void process_commands()
break;
case 999: // M999: Restart after being stopped
Stopped = false;
lcd_reset_alert_level();
gcode_LastN = Stopped_gcode_LastN;
FlushSerialRequestResend();
break;
Expand Down
19 changes: 10 additions & 9 deletions Marlin/cardreader.cpp
Expand Up @@ -527,14 +527,15 @@ void CardReader::updir()

void CardReader::printingHasFinished()
{
st_synchronize();
quickStop();
sdprinting = false;
if(SD_FINISHED_STEPPERRELEASE)
{
//finishAndDisableSteppers();
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
autotempShutdown();
st_synchronize();
quickStop();
file.close();
sdprinting = false;
if(SD_FINISHED_STEPPERRELEASE)
{
//finishAndDisableSteppers();
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
autotempShutdown();
}
#endif //SDSUPPORT
3 changes: 2 additions & 1 deletion Marlin/cardreader.h
Expand Up @@ -35,10 +35,11 @@ class CardReader
void setroot();


FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
FORCE_INLINE bool eof() { return sdpos>=filesize ;};
FORCE_INLINE int16_t get() { sdpos = file.curPosition();return (int16_t)file.read();};
FORCE_INLINE void setIndex(long index) {sdpos = index;file.seekSet(index);};
FORCE_INLINE uint8_t percentDone(){if(!sdprinting) return 0; if(filesize) return sdpos/((filesize+99)/100); else return 0;};
FORCE_INLINE uint8_t percentDone(){if(!isFileOpen()) return 0; if(filesize) return sdpos/((filesize+99)/100); else return 0;};
FORCE_INLINE char* getWorkDirName(){workDir.getFilename(filename);return filename;};

public:
Expand Down

0 comments on commit 1a8f54c

Please sign in to comment.