Skip to content

Commit

Permalink
getting packets failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yattien committed Apr 3, 2020
1 parent 01710c6 commit 466b6c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Changed use unique AP name
- Added factory reset possibility if OTA-update version is "-1"
- Fix update won't run

## Version v14

Expand Down
12 changes: 7 additions & 5 deletions ESPEInk_ESP8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Ctx ctx;
void setup() {
Serial.begin(115200);
pinMode(D0, WAKEUP_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
// pinMode(LED_BUILTIN, OUTPUT); // won't work, waveshare uses D2 as DC
// digitalWrite(LED_BUILTIN, HIGH);

getConfig();
initMqttClientName();
Expand Down Expand Up @@ -288,7 +288,9 @@ void loop() {
difference = (currentCycle - startCycle);
}

if ((isMqttEnabled && isUpdateAvailable) || !isMqttEnabled) {
if ((isMqttEnabled && isUpdateAvailable)
|| (isMqttEnabled && isDisplayUpdateRunning)
|| !isMqttEnabled) {
static bool serverStarted = false;
if (!serverStarted) {
initializeWebServer();
Expand All @@ -308,10 +310,10 @@ void loop() {
int decile = fmod(difference / (TICKS_PER_SECOND / 100.0), 100.0);
static bool ledStatus = false;
if (!ledStatus && decile == 95) {
digitalWrite(LED_BUILTIN, LOW);
// digitalWrite(LED_BUILTIN, LOW);
ledStatus = true;
} else if (ledStatus && decile == 0) {
digitalWrite(LED_BUILTIN, HIGH);
// digitalWrite(LED_BUILTIN, HIGH);
ledStatus = false;
}
}
Expand Down

0 comments on commit 466b6c2

Please sign in to comment.