Skip to content

Commit

Permalink
Fixed the scroller handling of ram strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Larswad committed Apr 15, 2015
1 parent 33c40f3 commit 36c8ca8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions uno2iec/global_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Reason for defining this is only that Qt Creator should understand the define when browsing the source files
// It won't be defined like this when compiling under arduino tools.
#define PROGMEM
#define __flash
#endif

typedef unsigned long ulong;
Expand Down
4 changes: 2 additions & 2 deletions uno2iec/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace {
char serCmdIOBuf[MAX_BYTES_PER_REQUEST];

#ifdef USE_LED_DISPLAY
byte scrollBuffer[35];
byte scrollBuffer[50];
#endif

} // unnamed namespace
Expand Down Expand Up @@ -584,7 +584,7 @@ void Interface::handleATNCmdClose()
strcpy_P((char*)scrollBuffer, (PGM_P)F(" SAVED: "));
else
strcpy_P((char*)scrollBuffer, (PGM_P)F(" LOADED: "));
strncat_P((char*)scrollBuffer, (char*)serCmdIOBuf, sizeof(scrollBuffer) - strlen_P((char*)scrollBuffer));
strncat((char*)scrollBuffer, (char*)serCmdIOBuf, sizeof(scrollBuffer) - strlen((char*)scrollBuffer));

if(0 not_eq m_pDisplay)
m_pDisplay->resetScrollText(scrollBuffer);
Expand Down
10 changes: 5 additions & 5 deletions uno2iec/uno2iec.includes
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
~/arduino-1.5.8/libraries/max7219
~/arduino-1.5.8/hardware/arduino/avr/cores/arduino
~/arduino-1.5.8/hardware/tools/avr/avr/include
~/arduino-1.5.8/hardware/arduino/avr/cores/arduino
~/arduino-1.5.8/libraries/SoftwareSerial/src
~/arduino-1.6.3/libraries/max7219
~/arduino-1.6.3/hardware/arduino/avr/cores/arduino
~/arduino-1.6.3/hardware/tools/avr/avr/include
~/arduino-1.6.3/hardware/arduino/avr/cores/arduino
~/arduino-1.6.3/libraries/SoftwareSerial/src
//F:/Arduino/libraries/max7219
//F:/Arduino/hardware/arduino/avr/cores/arduino
//F:/Program/Arduino/hardware/tools/avr/avr/include
Expand Down
6 changes: 3 additions & 3 deletions uno2iec/uno2iec.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

static Max7219* pMax;
// Put ANYTHING cool in here you want to scroll as an initial text on your MAX7219!
static const byte myText[] PROGMEM = " WELCOME TO THE NEW PORT OF MMC2IEC ARDUINO BY LARS WADEFALK IN 2013... ";
static const byte PROGMEM myText[] = " WELCOME TO UNO2IEC, 1541 ON ARDUINO BY LARS WADEFALK IN 2015... ";
// Note: This is the pin configuration for the MAX7219 display, if used (not IEC related).
static const byte PROGMEM MAX_INPIN = 11, MAX_LOADPIN = 13, MAX_CLOCKPIN = 12;
#endif
Expand Down Expand Up @@ -69,7 +69,7 @@ void setup()
iec.init();

#ifdef USE_LED_DISPLAY
pMax->resetScrollText(myText);
pMax->resetScrollText_p(myText);
#endif

lastMillis = millis();
Expand All @@ -88,7 +88,7 @@ void loop()
if(IEC::ATN_RESET == iface.handler()) {

#ifdef USE_LED_DISPLAY
pMax->resetScrollText(myText);
pMax->resetScrollText_p(myText);
// Indicate that IEC is in reset state.
pMax->setToCharacter('R');
#endif
Expand Down

0 comments on commit 36c8ca8

Please sign in to comment.