diff --git a/drivers/focuser/alluna_tcs2.cpp b/drivers/focuser/alluna_tcs2.cpp index 0575dfe7e2..4e1d90f6cd 100644 --- a/drivers/focuser/alluna_tcs2.cpp +++ b/drivers/focuser/alluna_tcs2.cpp @@ -26,6 +26,12 @@ * - add handybox add/remove * - create a python client looking like tcs2control * - make serial port selection easier + * + * KNOWN PROBLEMS: + * https://indilib.org/forum/focusers-filter-wheels/14173-new-zwo-eaf-first-use-experience-and-questions.html#98014 + * Note: When I try to enable Debug in the IndiControlPanel it immediately sets it to Disable? + * Debug is controlled (set on/off) in Ekos and these individual driver debug buttons no longer work. This behaviour is "as expected". + * */ #include "alluna_tcs2.h" @@ -58,6 +64,7 @@ AllunaTCS2::AllunaTCS2() //: DustCapInterface() FOCUSER_CAN_REL_MOVE ); //FIXME: maybe remove CAN_REL_MOVE } + bool AllunaTCS2::initProperties() { INDI::Focuser::initProperties(); @@ -122,7 +129,7 @@ bool AllunaTCS2::updateProperties() { // turn on green Connected-LED if (sendCommand("Connect 1\n")) - LOG_INFO("Turned on Connected-LED¨"); + ;//LOG_INFO("Turned on Connected-LED¨"); else LOG_ERROR("Cannot turn on Connected-LED"); @@ -364,9 +371,9 @@ bool AllunaTCS2::ISNewSwitch(const char * dev, const char * name, ISState * stat { // turn off green Connected-LED if (sendCommand("Connect 0\n")) - LOG_INFO("XTurned off Connected-LED"); + LOG_DEBUG("Turned off Connected-LED"); else - LOG_ERROR("XCannot turn off Connected-LED"); + LOG_ERROR("Cannot turn off Connected-LED"); } // Stepping Mode? if (!strcmp(name, SteppingModeSP.name)) @@ -480,7 +487,7 @@ bool AllunaTCS2::AbortFocuser() void AllunaTCS2::TimerHit() { - LOG_DEBUG("TimerHit"); + //LOG_INFO("TimerHit"); if (!isConnected()) return; // No need to reset timer if we are not connected anymore @@ -623,7 +630,12 @@ bool AllunaTCS2::readTemperature() std::chrono::duration seconds = std::chrono::system_clock::now() - last_temp_update; if ( !first_run && seconds.count() < 300 ) // update all 300 seconds { - return true; // use cached value + if (tcs.try_lock()) { + tcs.unlock(); // we need to get lock, to make TimerHit behave the same when we block reading temperature + return true; // return true, if we could get the lock + } else { + return false; // return false, if we could not get the lock + } } else if ( sendCommandOnly("GetTemperatures\n") ) {