mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-03 23:14:15 +01:00
- shrink utils source file, move heartbeat and boot management into system - improvise with 'heartbeat' functionality. include scheduler implementation that will manage the per-module heartbeat callbacks with individual 'mode' and 'interval' settings. current ones are mqtt (including relays, lights, thermostat), debug and influxdb. preserve heartbeat NONE, ONCE and REPEAT, REPEAT_STATUS is effectively a hbReport & status bit. - mqtt heartbeat is managed through mqttHeartbeat() callbacks - tweak mqtt callbacks to use lists instead of the vector, slighly reducing the size of the .bin - update WebUI, include report setting and update hbMode values - make sure general.h settings include new heartbeat, move constant definitions outside of the header - correctly include dependencies through the .cpp, avoid leaking internal details. - as a side-effect, base headers are no longer included recursively
24 lines
523 B
C++
24 lines
523 B
C++
/*
|
|
|
|
NETBIOS MODULE
|
|
|
|
Copyright (C) 2017-2019 by Xose Pérez <xose dot perez at gmail dot com>
|
|
|
|
*/
|
|
|
|
#include "netbios.h"
|
|
|
|
#if NETBIOS_SUPPORT
|
|
|
|
#include <ESP8266NetBIOS.h>
|
|
|
|
void netbiosSetup() {
|
|
static WiFiEventHandler _netbios_wifi_onSTA = WiFi.onStationModeGotIP([](WiFiEventStationModeGotIP ipInfo) {
|
|
auto hostname = getSetting("hostname", getIdentifier());
|
|
NBNS.begin(hostname.c_str());
|
|
DEBUG_MSG_P(PSTR("[NETBIOS] Configured for %s\n"), hostname.c_str());
|
|
});
|
|
}
|
|
|
|
#endif // NETBIOS_SUPPORT
|