From 8fb5c2188f212ec97f81e6eada343dcdfd94bbbc Mon Sep 17 00:00:00 2001 From: "Mark A. Tsuchida" Date: Fri, 21 Oct 2022 13:42:16 -0500 Subject: [PATCH] TriggerScope: Remove unused variables and fields --- DeviceAdapters/TriggerScope/TriggerScope.cpp | 12 +++++------- DeviceAdapters/TriggerScope/TriggerScope.h | 5 ----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/DeviceAdapters/TriggerScope/TriggerScope.cpp b/DeviceAdapters/TriggerScope/TriggerScope.cpp index 01ee12dcb..f171e19d2 100644 --- a/DeviceAdapters/TriggerScope/TriggerScope.cpp +++ b/DeviceAdapters/TriggerScope/TriggerScope.cpp @@ -55,7 +55,6 @@ const char* g_Keyword_Clear_All_Arrays = "Clear All Arrays"; const char* serial_terminator = "\n"; -const unsigned char uc_serial_terminator = 10; const char* line_feed = "\n"; const char * g_TriggerScope_Version = "v1.6.5, 8/16/16"; bool g_bTS16 = false; @@ -461,8 +460,8 @@ int CTriggerScopeHub::Initialize() if (initialized_) return DEVICE_OK; - char profilepath[1000]; #ifdef _WIN32 + char profilepath[1000]; ExpandEnvironmentStrings(TEXT("%userprofile%"),profilepath,1000); #else @@ -1192,10 +1191,10 @@ CTriggerScopeFocus::CTriggerScopeFocus() sequenceOn_ = true; CPropertyAction* pAct = new CPropertyAction(this, &CTriggerScopeFocus::OnUpperLimit); - int ret = CreateProperty("Upper Limit", "1000", MM::Float, false, pAct, true); + CreateProperty("Upper Limit", "1000", MM::Float, false, pAct, true); pAct = new CPropertyAction(this, &CTriggerScopeFocus::OnLowerLimit); - ret = CreateProperty("Lower Limit", "0", MM::Float, false, pAct, true); + CreateProperty("Lower Limit", "0", MM::Float, false, pAct, true); } @@ -2346,11 +2345,10 @@ void CTriggerScopeHub::ReceiveSerialBytes(unsigned char* buf, unsigned long bufl void CTriggerScopeHub::FlushSerialBytes(unsigned char* buf, unsigned long buflen) { buf_string_ = ""; - int nRet=0; unsigned long bytesRead=0; buf[0] = 0; - - nRet = ReadFromComPort(port_.c_str(), buf, buflen, bytesRead); + + ReadFromComPort(port_.c_str(), buf, buflen, bytesRead); if(nUseSerialLog_ && fidSerialLog_) { diff --git a/DeviceAdapters/TriggerScope/TriggerScope.h b/DeviceAdapters/TriggerScope/TriggerScope.h index 2aed804fb..fe2cdbe8d 100644 --- a/DeviceAdapters/TriggerScope/TriggerScope.h +++ b/DeviceAdapters/TriggerScope/TriggerScope.h @@ -273,7 +273,6 @@ class CTriggerScopeTTL : public CStateDeviceBase private: - CTriggerScopeHub *pHub_; int nChannel_; long ttl_; bool initialized_; @@ -284,8 +283,6 @@ class CTriggerScopeTTL : public CStateDeviceBase long curPos_; static const unsigned int NUMPATTERNS = 50; - unsigned pattern_[NUMPATTERNS]; - }; class CTriggerScopeCAM : public CStateDeviceBase @@ -304,7 +301,6 @@ class CTriggerScopeCAM : public CStateDeviceBase int WriteToPort(unsigned long value); private: - CTriggerScopeHub *pHub_; int nChannel_; long cam_; bool initialized_; @@ -380,7 +376,6 @@ class CTriggerScopeFocus : public CStageBase return DEVICE_OK; } private: - CTriggerScopeHub *pHub_; bool initialized_; bool busy_; double pos_um_;