mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Add deprecated shims for LiveWindowSendable and NamedSendable. (#834)
This will help prevent old code from breaking (not all cases, but should help).
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017 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 "LiveWindow/LiveWindowSendable.h"
|
||||
|
||||
#include "SmartDashboard/SendableBuilder.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
std::string LiveWindowSendable::GetName() const { return std::string(); }
|
||||
|
||||
void LiveWindowSendable::SetName(const llvm::Twine&) {}
|
||||
|
||||
std::string LiveWindowSendable::GetSubsystem() const { return std::string(); }
|
||||
|
||||
void LiveWindowSendable::SetSubsystem(const llvm::Twine&) {}
|
||||
|
||||
void LiveWindowSendable::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetUpdateTable([=]() { UpdateTable(); });
|
||||
}
|
||||
18
wpilibc/src/main/native/cpp/SmartDashboard/NamedSendable.cpp
Normal file
18
wpilibc/src/main/native/cpp/SmartDashboard/NamedSendable.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017 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 "SmartDashboard/NamedSendable.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
void NamedSendable::SetName(const llvm::Twine&) {}
|
||||
|
||||
std::string NamedSendable::GetSubsystem() const { return std::string(); }
|
||||
|
||||
void NamedSendable::SetSubsystem(const llvm::Twine&) {}
|
||||
|
||||
void NamedSendable::InitSendable(SendableBuilder&) {}
|
||||
Reference in New Issue
Block a user