raised max size for external EEPROM
parent
8a5f798780
commit
e4d0c779aa
|
@ -675,7 +675,11 @@ void CimditProfile::printFlash() {
|
|||
m_eepromPosition = 0;
|
||||
uint16_t len = nextUInt16();
|
||||
m_eepromPosition = 0;
|
||||
#ifdef EXTERNAL_EEPROM
|
||||
if (len < 32768) {
|
||||
#else
|
||||
if (len < 1024) {
|
||||
#endif
|
||||
uint8_t in;
|
||||
for (uint16_t i = 0; i < len; ++i) {
|
||||
in = nextUInt8();
|
||||
|
@ -707,11 +711,12 @@ void CimditProfile::writeFlash() {
|
|||
#ifdef EXTERNAL_EEPROM
|
||||
eepromWrite(m_eepromPosition++, len >> 8);
|
||||
eepromWrite(m_eepromPosition++, len & 255);
|
||||
if (len < 32768) {
|
||||
#else
|
||||
EEPROM.write(m_eepromPosition++, len >> 8);
|
||||
EEPROM.write(m_eepromPosition++, len & 255);
|
||||
#endif
|
||||
if (len < 1024) {
|
||||
#endif
|
||||
for (uint16_t i = 2; i < len; ++i) {
|
||||
while ((buf[0] = Serial.read()) == -1) {
|
||||
delay(100);
|
||||
|
@ -729,6 +734,9 @@ void CimditProfile::writeFlash() {
|
|||
Serial.println("written");
|
||||
initProfiles();
|
||||
}
|
||||
m_displayState = DISPLAY_BLANK; // to enforce a redraw
|
||||
showActiveProfile();
|
||||
return false;
|
||||
}
|
||||
|
||||
void CimditProfile::setUserString(uint8_t timeout, const char* input) {
|
||||
|
|
Loading…
Reference in New Issue