Remove logging from safeboot (#22464)

* Remove logging from safeboot

* Remove logs from Status 5
This commit is contained in:
s-hadinger 2024-11-11 10:39:18 +01:00 committed by GitHub
parent 448ca1c109
commit 343d9b9758
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 0 deletions

View File

@ -43,6 +43,7 @@ SPIClass *SpiBegin(uint32 bus) {
/********************************************************************************************/
void AddLogSpi(uint32_t hardware, int clk, int mosi, int miso) {
#ifndef FIRMWARE_MINIMAL
uint32_t enabled = TasmotaGlobal.soft_spi_enabled;
char hwswbus[8];
if (hardware) {
@ -72,4 +73,5 @@ void AddLogSpi(uint32_t hardware, int clk, int mosi, int miso) {
hwswbus, clk, mosi, miso);
break;
}
#endif // FIRMWARE_MINIMAL
}

View File

@ -956,7 +956,9 @@ void CmndStatus(void)
if ((0 == payload) || (5 == payload)) {
#ifdef USE_IPV6
#ifndef FIRMWARE_MINIMAL
if (5 == payload) { WifiDumpAddressesIPv6(); }
#endif // FIRMWARE_MINIMAL
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS5_NETWORK "\":{\"" D_CMND_HOSTNAME "\":\"%s\",\""
D_CMND_IPADDRESS "\":\"%_I\",\"" D_JSON_GATEWAY "\":\"%_I\",\"" D_JSON_SUBNETMASK "\":\"%_I\",\""
D_JSON_DNSSERVER "1\":\"%s\",\"" D_JSON_DNSSERVER "2\":\"%s\",\""

View File

@ -168,10 +168,12 @@ void EthernetEvent(arduino_event_t *event) {
}
TasmotaGlobal.rules_flag.eth_connected = 1;
TasmotaGlobal.global_state.eth_down = 0;
#ifndef FIRMWARE_MINIMAL
AddLog(LOG_LEVEL_DEBUG, PSTR("ETH: IPv4 %_I, mask %_I, gateway %_I"),
event->event_info.got_ip.ip_info.ip.addr,
event->event_info.got_ip.ip_info.netmask.addr,
event->event_info.got_ip.ip_info.gw.addr);
#endif // FIRMWARE_MINIMAL
WiFiHelper::scrubDNS(); // internal calls to reconnect can zero the DNS servers, save DNS for future use
break;
@ -181,9 +183,11 @@ void EthernetEvent(arduino_event_t *event) {
ip_addr_t ip_addr6;
ip_addr_copy_from_ip6(ip_addr6, event->event_info.got_ip6.ip6_info.ip);
IPAddress addr(&ip_addr6);
#ifndef FIRMWARE_MINIMAL
AddLog(LOG_LEVEL_DEBUG, PSTR("%s: IPv6 %s %s"),
event->event_id == ARDUINO_EVENT_ETH_GOT_IP6 ? "ETH" : "WIF",
IPv6isLocal(addr) ? PSTR("Local") : PSTR("Global"), addr.toString().c_str());
#endif // FIRMWARE_MINIMAL
if (!IPv6isLocal(addr)) { // declare network up on IPv6
TasmotaGlobal.rules_flag.eth_connected = 1;
TasmotaGlobal.global_state.eth_down = 0;
@ -235,13 +239,17 @@ void EthernetInit(void) {
if (eth_uses_spi) {
// Uses SPI Ethernet and needs at least SPI CS being ETH MDC
if (!PinUsed(GPIO_ETH_PHY_MDC)) {
#ifndef FIRMWARE_MINIMAL
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ETH "No ETH MDC as SPI CS GPIO defined"));
#endif // FIRMWARE_MINIMAL
return;
}
} else {
// Native ESP32
if (!PinUsed(GPIO_ETH_PHY_MDC) && !PinUsed(GPIO_ETH_PHY_MDIO)) { // && should be || but keep for backward compatibility
#ifndef FIRMWARE_MINIMAL
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ETH "No ETH MDC and ETH MDIO GPIO defined"));
#endif // FIRMWARE_MINIMAL
return;
}
}