Skip to content

Commit

Permalink
[simgui] Add 'Invalid' option for AllianceStation (wpilibsuite#5820)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiquanyeo authored Oct 24, 2023
1 parent cfc6a47 commit 8a8e220
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions glass/src/lib/native/cpp/other/FMS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

using namespace glass;

static const char* stations[] = {"Red 1", "Red 2", "Red 3",
"Blue 1", "Blue 2", "Blue 3"};
static const char* stations[] = {"Invalid", "Red 1", "Red 2", "Red 3",
"Blue 1", "Blue 2", "Blue 3"};

void glass::DisplayFMS(FMSModel* model) {
if (!model->Exists() || model->IsReadOnly()) {
Expand Down Expand Up @@ -41,7 +41,7 @@ void glass::DisplayFMS(FMSModel* model) {
if (auto data = model->GetAllianceStationIdData()) {
int val = data->GetValue();
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8);
if (ImGui::Combo("Alliance Station", &val, stations, 6)) {
if (ImGui::Combo("Alliance Station", &val, stations, 7)) {
model->SetAllianceStationId(val);
}
data->EmitDrag();
Expand Down

0 comments on commit 8a8e220

Please sign in to comment.