From 42d13e6713a19a32e40eb975e3e57bcb20de6419 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 3 Dec 2015 20:53:14 -0800 Subject: [PATCH] ui::OptionsField match option value by ==, not >=. I think I used >= to match baseband filter bandwidth, but then the options would all have to be in increasing order to do the right thing, which is not what another developer would expect! --- firmware/common/ui_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/common/ui_widget.cpp b/firmware/common/ui_widget.cpp index d2b040dbf..16c2829a9 100644 --- a/firmware/common/ui_widget.cpp +++ b/firmware/common/ui_widget.cpp @@ -397,7 +397,7 @@ void OptionsField::set_selected_index(const size_t new_index) { void OptionsField::set_by_value(value_t v) { size_t new_index { 0 }; for(const auto& option : options) { - if( option.second >= v ) { + if( option.second == v ) { set_selected_index(new_index); break; }