mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Remove GyroBase
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "frc/DriverStation.h"
|
||||
#include "frc/Timer.h"
|
||||
#include "frc/smartdashboard/SendableBuilder.h"
|
||||
#include "frc/smartdashboard/SendableRegistry.h"
|
||||
|
||||
using namespace frc;
|
||||
@@ -134,3 +135,9 @@ void ADXRS450_Gyro::Calibrate() {
|
||||
int ADXRS450_Gyro::GetPort() const {
|
||||
return m_port;
|
||||
}
|
||||
|
||||
void ADXRS450_Gyro::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Gyro");
|
||||
builder.AddDoubleProperty(
|
||||
"Value", [=]() { return GetAngle(); }, nullptr);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "frc/Base.h"
|
||||
#include "frc/Timer.h"
|
||||
#include "frc/WPIErrors.h"
|
||||
#include "frc/smartdashboard/SendableBuilder.h"
|
||||
#include "frc/smartdashboard/SendableRegistry.h"
|
||||
|
||||
using namespace frc;
|
||||
@@ -180,3 +181,9 @@ void AnalogGyro::Calibrate() {
|
||||
std::shared_ptr<AnalogInput> AnalogGyro::GetAnalogInput() const {
|
||||
return m_analog;
|
||||
}
|
||||
|
||||
void AnalogGyro::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Gyro");
|
||||
builder.AddDoubleProperty(
|
||||
"Value", [=]() { return GetAngle(); }, nullptr);
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include "frc/GyroBase.h"
|
||||
|
||||
#include "frc/WPIErrors.h"
|
||||
#include "frc/smartdashboard/SendableBuilder.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
void GyroBase::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Gyro");
|
||||
builder.AddDoubleProperty(
|
||||
"Value", [=]() { return GetAngle(); }, nullptr);
|
||||
}
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "frc/romi/RomiGyro.h"
|
||||
|
||||
#include "frc/smartdashboard/SendableBuilder.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
RomiGyro::RomiGyro() : m_simDevice("Gyro:RomiGyro") {
|
||||
@@ -87,3 +89,9 @@ void RomiGyro::Reset() {
|
||||
m_angleZOffset = m_simAngleZ.Get();
|
||||
}
|
||||
}
|
||||
|
||||
void RomiGyro::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Gyro");
|
||||
builder.AddDoubleProperty(
|
||||
"Value", [=]() { return GetAngle(); }, nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user