Skip to content

Commit

Permalink
Removed address display
Browse files Browse the repository at this point in the history
  • Loading branch information
ranihorev committed Aug 7, 2020
1 parent 76086e9 commit 4228ee1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
13 changes: 0 additions & 13 deletions src/I2cAnalyzerSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,8 @@ I2cAnalyzerSettings::I2cAnalyzerSettings()
mSclChannelInterface->SetTitleAndTooltip( "SCL", "Serial Clock Line" );
mSclChannelInterface->SetChannel( mSclChannel );

mAddressDisplayInterface.reset( new AnalyzerSettingInterfaceNumberList() );
mAddressDisplayInterface->SetTitleAndTooltip( "Address Display", "Specify how you would like the I2C address to be displayed." );
mAddressDisplayInterface->AddNumber(
YES_DIRECTION_8, "8-bit, read/write bit included",
"Displays the address as it would be seen in a microcontroller register (with the read/write bit included)" );
mAddressDisplayInterface->AddNumber( NO_DIRECTION_8, "8-bit, read/write bit set as 0",
"Displays the I2C address as an 8 bit number, but uses 0 in place of the read/write bit" );
mAddressDisplayInterface->AddNumber( NO_DIRECTION_7, "7-bit, address bits only", "Displays the I2C address as a 7-bit number" );
mAddressDisplayInterface->SetNumber( mAddressDisplay );

AddInterface( mSdaChannelInterface.get() );
AddInterface( mSclChannelInterface.get() );
AddInterface( mAddressDisplayInterface.get() );

// AddExportOption( 0, "Export as text/csv file", "text (*.txt);;csv (*.csv)" );
AddExportOption( 0, "Export as text/csv file" );
Expand All @@ -52,7 +41,6 @@ bool I2cAnalyzerSettings::SetSettingsFromInterfaces()

mSdaChannel = mSdaChannelInterface->GetChannel();
mSclChannel = mSclChannelInterface->GetChannel();
mAddressDisplay = AddressDisplay( U32( mAddressDisplayInterface->GetNumber() ) );

ClearChannels();
AddChannel( mSdaChannel, "SDA", true );
Expand Down Expand Up @@ -98,5 +86,4 @@ void I2cAnalyzerSettings::UpdateInterfacesFromSettings()
{
mSdaChannelInterface->SetChannel( mSdaChannel );
mSclChannelInterface->SetChannel( mSclChannel );
mAddressDisplayInterface->SetNumber( mAddressDisplay );
}
6 changes: 4 additions & 2 deletions src/I2cAnalyzerSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ class I2cAnalyzerSettings : public AnalyzerSettings

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

protected:
std::auto_ptr<AnalyzerSettingInterfaceChannel> mSdaChannelInterface;
std::auto_ptr<AnalyzerSettingInterfaceChannel> mSclChannelInterface;
std::auto_ptr<AnalyzerSettingInterfaceNumberList> mAddressDisplayInterface;
};

#endif // I2C_ANALYZER_SETTINGS

0 comments on commit 4228ee1

Please sign in to comment.