mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Use new NetworkTables across WPILib (C++ and Java).
Also make sure table listeners stop listening in their destructors. This might be better handled by moving the table itself into ITableListener and providing cleanup functionality there. A submodule is used to pull in ntcore. Change-Id: I3031c1a768595cf0f8754c47e15cd423e2dbcce5
This commit is contained in:
committed by
Brad Miller (WPI)
parent
f65e697107
commit
f89c5e150f
@@ -216,6 +216,8 @@ CANJaguar::~CANJaguar() {
|
||||
FRC_NetworkCommunication_CANSessionMux_sendMessage(
|
||||
m_deviceNumber | LM_API_VCOMP_T_SET, nullptr, 0,
|
||||
CAN_SEND_PERIOD_STOP_REPEATING, &status);
|
||||
|
||||
if (m_table != nullptr) m_table->RemoveTableListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1935,9 +1937,9 @@ uint8_t CANJaguar::GetDeviceID() const { return m_deviceNumber; }
|
||||
*/
|
||||
void CANJaguar::StopMotor() { DisableControl(); }
|
||||
|
||||
void CANJaguar::ValueChanged(std::shared_ptr<ITable> source, const std::string &key,
|
||||
EntryValue value, bool isNew) {
|
||||
Set(value.f);
|
||||
void CANJaguar::ValueChanged(ITable* source, llvm::StringRef key,
|
||||
std::shared_ptr<nt::Value> value, bool isNew) {
|
||||
if (value->type() == NT_DOUBLE) Set(value->GetDouble());
|
||||
}
|
||||
|
||||
void CANJaguar::UpdateTable() {
|
||||
|
||||
Reference in New Issue
Block a user