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:
Peter Johnson
2017-12-13 23:45:12 -08:00
committed by GitHub
parent 7f074563d0
commit de134a5c60
6 changed files with 222 additions and 0 deletions

View File

@@ -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(); });
}

View 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&) {}