From cb656ebdf74547fb176699429ba518cb90cd6e9a Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sun, 23 May 2021 23:22:46 -0500 Subject: [PATCH] Don't print Running standalone message when local server connection succeeds --- ResourceManager.cpp | 5 +++++ ResourceManager.h | 1 + main.cpp | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ResourceManager.cpp b/ResourceManager.cpp index 38b205d3..efe259c3 100644 --- a/ResourceManager.cpp +++ b/ResourceManager.cpp @@ -425,6 +425,11 @@ SettingsManager* ResourceManager::GetSettingsManager() return(settings_manager); } +bool ResourceManager::GetDetectionEnabled() +{ + return(detection_enabled); +} + unsigned int ResourceManager::GetDetectionPercent() { return (detection_percent.load()); diff --git a/ResourceManager.h b/ResourceManager.h index 90c01ca6..d4f5a462 100644 --- a/ResourceManager.h +++ b/ResourceManager.h @@ -118,6 +118,7 @@ public: void RegisterDetectionEndCallback(DetectionEndCallback new_callback, void * new_callback_arg); void RegisterI2CBusListChangeCallback(I2CBusListChangeCallback new_callback, void * new_callback_arg); + bool GetDetectionEnabled(); unsigned int GetDetectionPercent(); const char* GetDetectionString(); diff --git a/main.cpp b/main.cpp index 78780aec..34e1e161 100644 --- a/main.cpp +++ b/main.cpp @@ -241,7 +241,11 @@ int main(int argc, char* argv[]) \*---------------------------------------------------------*/ if(!(ret_flags & RET_FLAG_NO_DETECT)) { - printf("Running standalone.\r\n"); + if(ResourceManager::get()->GetDetectionEnabled()) + { + printf("Running standalone.\r\n"); + } + ResourceManager::get()->DetectDevices(); }