Skip to content

Commit babc187

Browse files
committed
<Fix factory programming examples
1 parent b7f3ac3 commit babc187

7 files changed

Lines changed: 32 additions & 1 deletion

File tree

examples/Inkplate4TEMPERA/Diagnostics/Inkplate4TEMPERA_Factory_Programming_VCOM/Inkplate4TEMPERA_Factory_Programming_VCOM.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ void setup()
171171
if (display.setVCOM(vcomVoltage))
172172
{
173173
Serial.println("\nVCOM EEPROM PROGRAMMING OK\n");
174+
175+
// Mark the device as tested and provisioned so the tests
176+
// don't run again on the next boot
177+
EEPROM.write(EEPROMaddress, 170);
178+
EEPROM.commit();
174179
break;
175180
}
176181
else

examples/Inkplate5/Diagnostics/Inkplate5_Factory_Programming_VCOM/Inkplate5_Factory_Programming_VCOM.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ void setup()
114114
if (display.setVCOM(vcomVoltage))
115115
{
116116
Serial.println("\nVCOM EEPROM PROGRAMMING OK\n");
117+
118+
// Mark the device as tested and provisioned so the tests
119+
// don't run again on the next boot
120+
EEPROM.write(EEPROMaddress, 170);
121+
EEPROM.commit();
117122
break;
118123
}
119124
else

examples/Inkplate5V2/Diagnostics/Inkplate5V2_Factory_Programming_VCOM/Inkplate5V2_Factory_Programming_VCOM.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ void setup()
171171
if (display.setVCOM(vcomVoltage))
172172
{
173173
Serial.println("\nVCOM EEPROM PROGRAMMING OK\n");
174+
175+
// Mark the device as tested and provisioned so the tests
176+
// don't run again on the next boot
177+
EEPROM.write(EEPROMaddress, 170);
178+
EEPROM.commit();
174179
break;
175180
}
176181
else

examples/Inkplate6/Diagnostics/Inkplate6_Factory_Programming_VCOM/Inkplate6_Factory_Programming_VCOM.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ void setup()
165165
if (display.setVCOM(vcomVoltage))
166166
{
167167
Serial.println("\nVCOM EEPROM PROGRAMMING OK\n");
168+
169+
// Mark the device as tested and provisioned so the tests
170+
// don't run again on the next boot
171+
EEPROM.write(EEPROMaddress, 170);
172+
EEPROM.commit();
168173
break;
169174
}
170175
else

examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Factory_Programming/Inkplate6COLOR_Factory_Programming.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ void setup()
111111
// Wakeup button
112112
pinMode(GPIO_NUM_36, INPUT);
113113

114-
bool isFirstStartup = true;
114+
// Check for the first run of this code by reading the marker from EEPROM
115+
bool isFirstStartup = (EEPROM.read(EEPROMaddress) != 170);
115116

116117
if (isFirstStartup)
117118
{

examples/Inkplate6FLICK/Diagnostics/Inkplate6FLICK_Factory_Programming_VCOM/Inkplate6FLICK_Factory_Programming_VCOM.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ void setup()
110110
if (display.setVCOM(vcomVoltage))
111111
{
112112
Serial.println("\nVCOM EEPROM PROGRAMMING OK\n");
113+
114+
// Mark the device as tested and provisioned so the tests
115+
// don't run again on the next boot
116+
EEPROM.write(EEPROMaddress, 170);
117+
EEPROM.commit();
113118
break;
114119
}
115120
else

examples/Inkplate6PLUS/Diagnostics/Inkplate6PLUS_Factory_Programming_VCOM/Inkplate6PLUS_Factory_Programming_VCOM.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ void setup()
117117
if (display.setVCOM(vcomVoltage))
118118
{
119119
Serial.println("\nVCOM EEPROM PROGRAMMING OK\n");
120+
121+
// Mark the device as tested and provisioned so the tests
122+
// don't run again on the next boot
123+
EEPROM.write(EEPROMaddress, 170);
124+
EEPROM.commit();
120125
break;
121126
}
122127
else

0 commit comments

Comments
 (0)