Skip to content

Commit

Permalink
Fix display length for M117 / Status Messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nibbels committed Apr 19, 2017
1 parent 11db77b commit 7e02f48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Repetier/Constants.h
Expand Up @@ -20,7 +20,7 @@
#define CONSTANTS_H


#define REPETIER_VERSION "RF.01.37i2.Mod"
#define REPETIER_VERSION "RF.01.37i3.Mod"
#define UI_PRINTER_COMPANY "Conrad SE"
#define UI_VERSION_STRING "V " REPETIER_VERSION

Expand Down
4 changes: 2 additions & 2 deletions Repetier/ui.cpp
Expand Up @@ -1876,7 +1876,7 @@ void UIDisplay::setStatusP(PGM_P txt,bool error)
}

uint8_t i=0;
while(i<20)
while(i<UI_COLS)
{
uint8_t c = pgm_read_byte(txt++);
if(!c) break;
Expand All @@ -1899,7 +1899,7 @@ void UIDisplay::setStatus(char *txt,bool error,bool force)
if(!error && Printer::isUIErrorMessage()) return;

uint8_t i=0;
while(*txt && i<16)
while(*txt && i< UI_COLS )
statusMsg[i++] = *txt++;
statusMsg[i]=0;

Expand Down
4 changes: 2 additions & 2 deletions Repetier/ui.h
Expand Up @@ -327,7 +327,7 @@ extern char g_nPrinterReady;
#define UI_MENU_FILESELECT(name,items,itemsCnt) const UIMenuEntry * const name ## _entries[] PROGMEM = items;const UIMenu name PROGMEM = {1,0,itemsCnt,name ## _entries};

// Maximum size of a row - if row is larger, text gets scrolled
#define MAX_COLS 28
#define MAX_COLS 20

#define UI_FLAG_FAST_KEY_ACTION 1
#define UI_FLAG_SLOW_KEY_ACTION 2
Expand Down Expand Up @@ -365,7 +365,7 @@ class UIDisplay
int repeatDuration; // Time beween to actions if autorepeat is enabled
int8_t oldMenuLevel;
uint8_t encoderStartScreen;
char statusMsg[21];
char statusMsg[MAX_COLS + 1];
int8_t encoderPos;
int8_t encoderLast;
PGM_P statusText;
Expand Down

0 comments on commit 7e02f48

Please sign in to comment.