Fix disconnection message for Ethernet

This commit is contained in:
Dale Whinham committed 2021-09-16 21:00:36 +01:00
1 parent f14185cea4
commit 40a6389cf4
3 files changed
+7 -3

No files matched your search

+4
View File
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- "WiFi disconnected!" would be shown on the LCD when Ethernet was disconnected.
### Changed
- Update to libmt32emu v2.5.3.
+1
View File
@@ -130,6 +130,7 @@ private:
void DeferSwitchSoundFont(size_t nIndex);
void SetMasterVolume(s32 nVolume);
const char* GetNetworkDeviceShortName() const;
void LEDOn();
void LCDLog(TLCDLogType Type, const char* pFormat...);
+2 -3
View File
@@ -825,12 +825,11 @@ void CMT32Pi::UpdateNetwork()
{
m_bNetworkReady = true;
const char* pNetDevName = CConfig::Get()->NetworkMode == CConfig::TNetworkMode::Ethernet ? "Ether" : "Wi-Fi";
CString IPString;
m_pNet->GetConfig()->GetIPAddress ()->Format(&IPString);
m_pLogger->Write(MT32PiName, LogNotice, "Network up and running at: %s", static_cast<const char *>(IPString));
LCDLog(TLCDLogType::Notice, "%s: %s", pNetDevName, static_cast<const char*>(IPString));
LCDLog(TLCDLogType::Notice, "%s: %s", GetNetworkDeviceShortName(), static_cast<const char*>(IPString));
if (m_pConfig->NetworkRTPMIDI)
{
@@ -849,7 +848,7 @@ void CMT32Pi::UpdateNetwork()
{
m_bNetworkReady = false;
m_pLogger->Write(MT32PiName, LogNotice, "Network disconnected.");
LCDLog(TLCDLogType::Notice, "WiFi disconnected!");
LCDLog(TLCDLogType::Notice, "%s disconnected!", GetNetworkDeviceShortName());
delete m_pAppleMIDIParticipant;
}