mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Call SmartDashboard::init() in RobotBase constructor. (#428)
Fixes #427
This commit is contained in:
committed by
Peter Johnson
parent
ed1a94531a
commit
65b091a39a
@@ -10,7 +10,6 @@
|
||||
#include "DriverStation.h"
|
||||
#include "HAL/HAL.h"
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
#include "SmartDashboard/SmartDashboard.h"
|
||||
#include "networktables/NetworkTable.h"
|
||||
|
||||
using namespace frc;
|
||||
@@ -27,7 +26,6 @@ void IterativeRobot::StartCompetition() {
|
||||
|
||||
LiveWindow* lw = LiveWindow::GetInstance();
|
||||
// first and one-time initialization
|
||||
SmartDashboard::init();
|
||||
NetworkTable::GetTable("LiveWindow")
|
||||
->GetSubTable("~STATUS~")
|
||||
->PutBoolean("LW Enabled", false);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "HLUsageReporting.h"
|
||||
#include "Internal/HardwareHLReporting.h"
|
||||
#include "RobotState.h"
|
||||
#include "SmartDashboard/SmartDashboard.h"
|
||||
#include "Utility.h"
|
||||
#include "WPILibVersion.h"
|
||||
#include "networktables/NetworkTable.h"
|
||||
@@ -42,6 +43,8 @@ RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) {
|
||||
NetworkTable::SetNetworkIdentity("Robot");
|
||||
NetworkTable::SetPersistentFilename("/home/lvuser/networktables.ini");
|
||||
|
||||
SmartDashboard::init();
|
||||
|
||||
std::FILE* file = nullptr;
|
||||
file = std::fopen("/tmp/frc_versions/FRC_Lib_Version.ini", "w");
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "DriverStation.h"
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
#include "SmartDashboard/SmartDashboard.h"
|
||||
#include "Timer.h"
|
||||
#include "networktables/NetworkTable.h"
|
||||
|
||||
@@ -106,7 +105,6 @@ void SampleRobot::StartCompetition() {
|
||||
HAL_Report(HALUsageReporting::kResourceType_Framework,
|
||||
HALUsageReporting::kFramework_Simple);
|
||||
|
||||
SmartDashboard::init();
|
||||
NetworkTable::GetTable("LiveWindow")
|
||||
->GetSubTable("~STATUS~")
|
||||
->PutBoolean("LW Enabled", false);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "DriverStation.h"
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
#include "SmartDashboard/SmartDashboard.h"
|
||||
#include "networktables/NetworkTable.h"
|
||||
|
||||
// not sure what this is used for yet.
|
||||
@@ -30,7 +29,6 @@ using namespace frc;
|
||||
void IterativeRobot::StartCompetition() {
|
||||
LiveWindow* lw = LiveWindow::GetInstance();
|
||||
// first and one-time initialization
|
||||
SmartDashboard::init();
|
||||
NetworkTable::GetTable("LiveWindow")
|
||||
->GetSubTable("~STATUS~")
|
||||
->PutBoolean("LW Enabled", false);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "RobotBase.h"
|
||||
|
||||
#include "RobotState.h"
|
||||
#include "SmartDashboard/SmartDashboard.h"
|
||||
#include "Utility.h"
|
||||
|
||||
using namespace frc;
|
||||
@@ -25,6 +26,7 @@ using namespace frc;
|
||||
*/
|
||||
RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) {
|
||||
RobotState::SetImplementation(DriverStation::GetInstance());
|
||||
SmartDashboard::init();
|
||||
time_sub = MainNode::Subscribe("~/time", &wpilib::internal::time_callback);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
#include "SmartDashboard/SmartDashboard.h"
|
||||
#include "Timer.h"
|
||||
#include "networktables/NetworkTable.h"
|
||||
|
||||
@@ -105,7 +104,6 @@ void SampleRobot::RobotMain() { m_robotMainOverridden = false; }
|
||||
void SampleRobot::StartCompetition() {
|
||||
LiveWindow* lw = LiveWindow::GetInstance();
|
||||
|
||||
SmartDashboard::init();
|
||||
NetworkTable::GetTable("LiveWindow")
|
||||
->GetSubTable("~STATUS~")
|
||||
->PutBoolean("LW Enabled", false);
|
||||
|
||||
Reference in New Issue
Block a user