From 6d79972ada9f04fef415646d38117f3b34b09ca8 Mon Sep 17 00:00:00 2001 From: Marcus10110 Date: Mon, 28 Oct 2024 13:01:42 -0700 Subject: [PATCH] removed unused member variables (based on this PR: https://github.com/saleae/SampleAnalyzer/pull/28) --- src/SimpleSerialAnalyzer.cpp | 6 +++--- src/SimpleSerialAnalyzer.h | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/SimpleSerialAnalyzer.cpp b/src/SimpleSerialAnalyzer.cpp index ef44917..2308631 100644 --- a/src/SimpleSerialAnalyzer.cpp +++ b/src/SimpleSerialAnalyzer.cpp @@ -25,15 +25,15 @@ void SimpleSerialAnalyzer::SetupResults() void SimpleSerialAnalyzer::WorkerThread() { - mSampleRateHz = GetSampleRate(); + U32 sample_rate_hz = GetSampleRate(); mSerial = GetAnalyzerChannelData( mSettings.mInputChannel ); if( mSerial->GetBitState() == BIT_LOW ) mSerial->AdvanceToNextEdge(); - U32 samples_per_bit = mSampleRateHz / mSettings.mBitRate; - U32 samples_to_first_center_of_first_data_bit = U32( 1.5 * double( mSampleRateHz ) / double( mSettings.mBitRate ) ); + U32 samples_per_bit = sample_rate_hz / mSettings.mBitRate; + U32 samples_to_first_center_of_first_data_bit = U32( 1.5 * double( sample_rate_hz ) / double( mSettings.mBitRate ) ); for( ; ; ) { diff --git a/src/SimpleSerialAnalyzer.h b/src/SimpleSerialAnalyzer.h index 15ee87d..e94d8d4 100644 --- a/src/SimpleSerialAnalyzer.h +++ b/src/SimpleSerialAnalyzer.h @@ -29,11 +29,6 @@ class ANALYZER_EXPORT SimpleSerialAnalyzer : public Analyzer2 SimpleSerialSimulationDataGenerator mSimulationDataGenerator; bool mSimulationInitilized; - - //Serial analysis vars: - U32 mSampleRateHz; - U32 mStartOfStopBitOffset; - U32 mEndOfStopBitOffset; }; extern "C" ANALYZER_EXPORT const char* __cdecl GetAnalyzerName();