  *
  * @param event WiFiEventSoftAPModeStationConnected Event
  */
-void onAPConnected(WiFiEventSoftAPModeStationConnected event)
+void onAPConnected(const WiFiEventSoftAPModeStationConnected &event)
 {
   DEBUGLOG("[WIFI] SSID        : %s\n", cfg.hostname);
   DEBUGLOG("[WIFI] Password    : %s\n", ADMIN_PASSWORD);

{
  static WiFiEventHandler gotIpEventHandler, apConnectedEventHandler,
      disconnectedEventHandler;
  gotIpEventHandler = WiFi.onStationModeGotIP(onSTAGotIP);
  apConnectedEventHandler = WiFi.onSoftAPModeStationConnected(onAPConnected);
  disconnectedEventHandler = WiFi.onStationModeDisconnected(onSTADisconnected);

  // Set WiFi hostname
  if (os_strlen(cfg.hostname) == 0)

 *
 * @param event WiFiEventStationModeDisconnected Event
 */
void onSTADisconnected(const WiFiEventStationModeDisconnected &event)
{
  DEBUGLOG("WiFi connection (%s) dropped.\n", event.ssid.c_str());
  DEBUGLOG("Reason: %d\n", event.reason);
