Skip to content

Commit

Permalink
Removed mAddressDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
ranihorev committed Aug 7, 2020
1 parent 4228ee1 commit 582cfb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 43 deletions.
39 changes: 3 additions & 36 deletions src/I2cAnalyzerResults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,7 @@ void I2cAnalyzerResults::GenerateBubbleText( U64 frame_index, Channel& /*channel
if( frame.mType == I2cAddress )
{
char number_str[ 128 ];
switch( mSettings->mAddressDisplay )
{
case NO_DIRECTION_7:
AnalyzerHelpers::GetNumberString( frame.mData1 >> 1, display_base, 7, number_str, 128 );
break;
case NO_DIRECTION_8:
AnalyzerHelpers::GetNumberString( frame.mData1 & 0xFE, display_base, 8, number_str, 128 );
break;
case YES_DIRECTION_8:
AnalyzerHelpers::GetNumberString( frame.mData1, display_base, 8, number_str, 128 );
break;
}
AnalyzerHelpers::GetNumberString( frame.mData1 >> 1, display_base, 7, number_str, 128 );

I2cDirection direction;
if( ( frame.mData1 & 0x1 ) != 0 )
Expand Down Expand Up @@ -127,18 +116,7 @@ void I2cAnalyzerResults::GenerateExportFile( const char* file, DisplayBase displ

if( frame.mType == I2cAddress )
{
switch( mSettings->mAddressDisplay )
{
case NO_DIRECTION_7:
AnalyzerHelpers::GetNumberString( frame.mData1 >> 1, display_base, 7, address, 128 );
break;
case NO_DIRECTION_8:
AnalyzerHelpers::GetNumberString( frame.mData1 & 0xFE, display_base, 8, address, 128 );
break;
case YES_DIRECTION_8:
AnalyzerHelpers::GetNumberString( frame.mData1, display_base, 8, address, 128 );
break;
}
AnalyzerHelpers::GetNumberString( frame.mData1 >> 1, display_base, 7, address, 128 );
if( ( frame.mData1 & 0x1 ) != 0 )
snprintf( rw, sizeof( rw ), "Read" );
else
Expand Down Expand Up @@ -219,18 +197,7 @@ void I2cAnalyzerResults::GenerateFrameTabularText( U64 frame_index, DisplayBase
if( frame.mType == I2cAddress )
{
char number_str[ 128 ];
switch( mSettings->mAddressDisplay )
{
case NO_DIRECTION_7:
AnalyzerHelpers::GetNumberString( frame.mData1 >> 1, display_base, 7, number_str, 128 );
break;
case NO_DIRECTION_8:
AnalyzerHelpers::GetNumberString( frame.mData1 & 0xFE, display_base, 8, number_str, 128 );
break;
case YES_DIRECTION_8:
AnalyzerHelpers::GetNumberString( frame.mData1, display_base, 8, number_str, 128 );
break;
}
AnalyzerHelpers::GetNumberString( frame.mData1 >> 1, display_base, 7, number_str, 128 );

I2cDirection direction;
if( ( frame.mData1 & 0x1 ) != 0 )
Expand Down
4 changes: 1 addition & 3 deletions src/I2cAnalyzerSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <cstring>

I2cAnalyzerSettings::I2cAnalyzerSettings()
: mSdaChannel( UNDEFINED_CHANNEL ), mSclChannel( UNDEFINED_CHANNEL ), mAddressDisplay( NO_DIRECTION_7 )
: mSdaChannel( UNDEFINED_CHANNEL ), mSclChannel( UNDEFINED_CHANNEL )
{
mSdaChannelInterface.reset( new AnalyzerSettingInterfaceChannel() );
mSdaChannelInterface->SetTitleAndTooltip( "SDA", "Serial Data Line" );
Expand Down Expand Up @@ -61,7 +61,6 @@ void I2cAnalyzerSettings::LoadSettings( const char* settings )

text_archive >> mSdaChannel;
text_archive >> mSclChannel;
text_archive >> *( U32* )&mAddressDisplay;

ClearChannels();
AddChannel( mSdaChannel, "SDA", true );
Expand All @@ -77,7 +76,6 @@ const char* I2cAnalyzerSettings::SaveSettings()
text_archive << "SaleaeI2CAnalyzer";
text_archive << mSdaChannel;
text_archive << mSclChannel;
text_archive << mAddressDisplay;

return SetReturnString( text_archive.GetString() );
}
Expand Down
4 changes: 0 additions & 4 deletions src/I2cAnalyzerSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class I2cAnalyzerSettings : public AnalyzerSettings

Channel mSdaChannel;
Channel mSclChannel;
enum AddressDisplay mAddressDisplay
{
NO_DIRECTION_7
};

protected:
std::auto_ptr<AnalyzerSettingInterfaceChannel> mSdaChannelInterface;
Expand Down

0 comments on commit 582cfb8

Please sign in to comment.