mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Update wpilibc to use new NetworkTables package and interfaces.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "SPI.h"
|
||||
#include "SensorBase.h"
|
||||
#include "interfaces/Accelerometer.h"
|
||||
#include "networktables/NetworkTableEntry.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
@@ -73,9 +74,9 @@ class ADXL345_SPI : public Accelerometer, public LiveWindowSendable {
|
||||
virtual AllAxes GetAccelerations();
|
||||
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
void InitTable(std::shared_ptr<nt::NetworkTable> subtable) override;
|
||||
void UpdateTable() override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
std::shared_ptr<nt::NetworkTable> GetTable() const override;
|
||||
void StartLiveWindowMode() override {}
|
||||
void StopLiveWindowMode() override {}
|
||||
|
||||
@@ -83,7 +84,10 @@ class ADXL345_SPI : public Accelerometer, public LiveWindowSendable {
|
||||
SPI m_spi;
|
||||
|
||||
private:
|
||||
std::shared_ptr<ITable> m_table;
|
||||
std::shared_ptr<nt::NetworkTable> m_table;
|
||||
nt::NetworkTableEntry m_xEntry;
|
||||
nt::NetworkTableEntry m_yEntry;
|
||||
nt::NetworkTableEntry m_zEntry;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user