Skip to content

Commit

Permalink
change filter only Roboception devices to only rc_... devices
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Jun 27, 2022
1 parent c01e5bb commit d1e300c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions tools/rcdiscover-gui/discover-frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@
static bool isMadeByRc(const wxVector<wxVariant> &device)
{
return device[DiscoverFrame::MANUFACTURER].GetString() == ROBOCEPTION ||
device[DiscoverFrame::MODEL].GetString().StartsWith(RC_VISARD) ||
device[DiscoverFrame::MODEL].GetString().StartsWith(RC_CUBE);
device[DiscoverFrame::MODEL].GetString().StartsWith("rc_");
}

static bool isMadeByRc(const wxDataViewListCtrl &device_list, unsigned int row)
{
return device_list.GetTextValue(row, DiscoverFrame::MANUFACTURER) == ROBOCEPTION ||
device_list.GetTextValue(row, DiscoverFrame::MODEL).StartsWith(RC_VISARD) ||
device_list.GetTextValue(row, DiscoverFrame::MODEL).StartsWith(RC_CUBE);
device_list.GetTextValue(row, DiscoverFrame::MODEL).StartsWith("rc_");
}

static bool isRcVisard(const wxVector<wxVariant> &device)
Expand Down Expand Up @@ -150,7 +148,7 @@ DiscoverFrame::DiscoverFrame(const wxString& title,
int w, h;
discover_button_->GetSize(&w, &h);
auto *only_rc_cbox = new wxCheckBox(panel, ID_OnlyRcCheckbox,
"Only Roboception devices",
"Only rc_... devices",
wxDefaultPosition, wxSize(-1, h));
only_rc_cbox->SetValue(only_rc_sensors_);
button_box->Add(only_rc_cbox, 1);
Expand Down
1 change: 0 additions & 1 deletion tools/rcdiscover-gui/resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ void registerResources();

const static std::string ROBOCEPTION = "Roboception GmbH";
const static std::string RC_VISARD = "rc_visard";
const static std::string RC_CUBE = "rc_cube";

#endif /* REGISTER_RESOURCES */

0 comments on commit d1e300c

Please sign in to comment.