Skip to content

Commit

Permalink
[mm] Update disconnected display on connect failure to show err
Browse files Browse the repository at this point in the history
  • Loading branch information
CapnBry committed May 24, 2021
1 parent 9d1b870 commit b7cf04c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arduino/MeterMonitor/MeterMonitor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ static void proxy_onError(err_t err)
{
Serial.print(F("Socket Error ")); Serial.println(err);
g_LastClientError = err;

// There's no "disconnect" event if never connected, so trigger display err
if (hm.getProtocolState() == HeaterMeterClient::hpsConnecting)
ledsShowDisconnected();
}

static void proxy_onWifiConnect(void)
Expand Down

0 comments on commit b7cf04c

Please sign in to comment.