-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix C++ ShuffleboardComponent template type * Fix `WithWidget(WidgetType&)`not being properly capitalized * Fix data members across dll boundaries by using enum for built in types
- Loading branch information
1 parent
182758c
commit e8b2471
Showing
12 changed files
with
184 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
wpilibc/src/main/native/cpp/shuffleboard/BuiltInLayouts.cpp
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
wpilibc/src/main/native/cpp/shuffleboard/BuiltInWidgets.cpp
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
wpilibc/src/main/native/cpp/shuffleboard/ShuffleboardWidget.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/*----------------------------------------------------------------------------*/ | ||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */ | ||
/* Open Source Software - may be modified and shared by FRC teams. The code */ | ||
/* must be accompanied by the FIRST BSD license file in the root directory of */ | ||
/* the project. */ | ||
/*----------------------------------------------------------------------------*/ | ||
|
||
#include "frc/shuffleboard/ShuffleboardWidget.h" | ||
|
||
using namespace frc; | ||
|
||
static constexpr const char* widgetStrings[] = { | ||
"Text View", | ||
"Number Slider", | ||
"Number Bar", | ||
"Simple Dial", | ||
"Graph", | ||
"Boolean Box", | ||
"Toggle Button", | ||
"Toggle Switch", | ||
"Voltage View", | ||
"PDP", | ||
"ComboBox Chooser", | ||
"Split Button Chooser", | ||
"Encoder", | ||
"Speed Controller", | ||
"Command", | ||
"PID Command", | ||
"PID Controller", | ||
"Accelerometer", | ||
"3-Axis Accelerometer", | ||
"Gyro", | ||
"Relay", | ||
"Differential Drivebase", | ||
"Mecanum Drivebase", | ||
"Camera Stream", | ||
}; | ||
|
||
const char* detail::GetStringForWidgetType(BuiltInWidgets type) { | ||
return widgetStrings[static_cast<int>(type)]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.