From bfce81f16239235b3d54c26a6b5a379e11e17274 Mon Sep 17 00:00:00 2001 From: Wolfgang Reissenberger Date: Sun, 10 Sep 2023 23:15:58 +0200 Subject: [PATCH] Bug fix only first focuser is visible Due to the underlying device name setting, the fact that FocusLynx has two independent drivers, its name setting does not work. With this fix the device names of the two focusers are fix to FocusLynx F1/F2. --- drivers/focuser/focuslynx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/focuser/focuslynx.cpp b/drivers/focuser/focuslynx.cpp index 28c1089e19..5612beb4ca 100644 --- a/drivers/focuser/focuslynx.cpp +++ b/drivers/focuser/focuslynx.cpp @@ -48,6 +48,8 @@ FocusLynxF1::FocusLynxF1(const char *target) * F1 or F2 to set the target of the created instance */ setFocusTarget(target); + // set the focuser name to a fixed value to ensure that both focusers are visible + setDeviceName(FocusLynxF1::getDefaultName()); // Both communication available, Serial and network (tcp/ip) setSupportedConnections(CONNECTION_SERIAL | CONNECTION_TCP); @@ -752,6 +754,8 @@ void FocusLynxF1::setDebug(bool enable) FocusLynxF2::FocusLynxF2(const char *target) { setFocusTarget(target); + // set the focuser name to a fixed value to ensure that both focusers are visible + setDeviceName(FocusLynxF2::getDefaultName()); // The second focuser has no direct communication with the hub setSupportedConnections(CONNECTION_NONE);