Now restarting when connection fails works.

master
Holger Wirtz 4 years ago
parent 6beba5c112
commit 71525dd324
  1. 20
      OSC2MIDI.ino

@ -49,6 +49,7 @@ void OSCMixerMuteToMidiCC(OSCMessage &msg, int offset);
void OSCMixerSoloToMidiCC(OSCMessage &msg, int offset);
void MidiCCToOSC(uint8_t channel, uint8_t number, uint8_t value);
void ConfigAPWeb(void);
void ConfigAPStarted(WiFiManager* wm);
/*void change_midi_state(uint8_t midichannel, uint8_t cc, uint8_t value);
void show_midi_state(void);
@ -155,15 +156,14 @@ void setup()
WiFiManager wm;
/*
//called after AP mode and config portal has started
void setAPCallback( std::function<void(WiFiManager*)> func );
//called after webserver has started */
wm.setWebServerCallback(ConfigAPWeb);
wm.setAPCallback(ConfigAPStarted);
wm.setConnectTimeout(WIFI_CONNECT_TIMEOUT);
wm.setConfigPortalTimeout(CFG_PORTAL_TIMEOUT);
wm.setBreakAfterConfig(true);
wm.setRemoveDuplicateAPs(true);
wm.setWiFiAutoReconnect(false);
wm.setEnableConfigPortal(false);
if (!wm.autoConnect(AP_SSID_CONFIG_NAME, AP_CONFIG_PASSWORD))
{
@ -174,8 +174,8 @@ void setup()
delay(1000);
ESP.restart();
}
else {
//if you get here you have connected to the WiFi
else
{
DEBUG_MSG("Connected\n");
if (!MDNS.begin(MDNS_NAME))
@ -1042,6 +1042,12 @@ void ConfigAPWeb(void)
lcd.print(F("192.168.4.1"));
}
void ConfigAPStarted(WiFiManager * wm)
{
lcd.clear();
DEBUG_MSG("Config-AP started\n");
}
void listDir(fs::FS & fs, const char * dirname, uint8_t levels)
{
DEBUG_MSG("Listing directory : %s\n", dirname);

Loading…
Cancel
Save