Skip to content

Commit

Permalink
reconnection issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vascofazza committed Jan 6, 2021
1 parent 532c52d commit d49bdac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nixie_firmware/src/drivers/tube_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,16 @@ void TubeDriver::set_tubes(int8_t h, int8_t hh, int8_t m, int8_t mm, int8_t s, i
//prepare the data payload
unsigned int payload = (ss & 0xF) | ((s & 0xF) << 4) | ((mm & 0xF) << 8) | ((m & 0xF) << 12) | ((hh & 0xF) << 16) | ((h & 0xF) << 20);
// the LEDs don't change while you're sending in bits:

noInterrupts();
digitalWrite(SHF_LATCH, LOW);
// shift out the bits:
shiftOut(SHF_DATA, SHF_CLOCK, LSBFIRST, payload);
shiftOut(SHF_DATA, SHF_CLOCK, LSBFIRST, payload >> 8);
shiftOut(SHF_DATA, SHF_CLOCK, LSBFIRST, payload >> 16);
//take the latch pin high so the LEDs will light up:
digitalWrite(SHF_LATCH, HIGH);
interrupts();
}

void TubeDriver::adjust_brightness()
Expand Down
2 changes: 2 additions & 0 deletions nixie_firmware/src/network/wifi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ void wifi_loop()
{
DEBUG_PRINTLN(F("Connection restored, stopping Config Portal."));
wifiManager.stopConfigPortal();
wifiManager.server.get()->end();
wifiManager.server.get()->begin();
wifiManager.startWebPortal();
}

Expand Down

0 comments on commit d49bdac

Please sign in to comment.