mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Run wpiformat on merged repo (#1021)
This commit is contained in:
committed by
Peter Johnson
parent
0babbf317c
commit
6729a7d6b1
@@ -41,8 +41,7 @@ class DriverStation : public ErrorBase, public RobotStateInterface {
|
||||
static void ReportError(const wpi::Twine& error);
|
||||
static void ReportWarning(const wpi::Twine& error);
|
||||
static void ReportError(bool isError, int code, const wpi::Twine& error,
|
||||
const wpi::Twine& location,
|
||||
const wpi::Twine& stack);
|
||||
const wpi::Twine& location, const wpi::Twine& stack);
|
||||
|
||||
static constexpr int kJoystickPorts = 6;
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ class Error {
|
||||
const ErrorBase* GetOriginatingObject() const;
|
||||
double GetTimestamp() const;
|
||||
void Clear();
|
||||
void Set(Code code, const wpi::Twine& contextMessage,
|
||||
wpi::StringRef filename, wpi::StringRef function, int lineNumber,
|
||||
void Set(Code code, const wpi::Twine& contextMessage, wpi::StringRef filename,
|
||||
wpi::StringRef function, int lineNumber,
|
||||
const ErrorBase* originatingObject);
|
||||
|
||||
private:
|
||||
|
||||
@@ -103,8 +103,7 @@ class ErrorBase {
|
||||
virtual void CloneError(const ErrorBase& rhs) const;
|
||||
virtual void ClearError() const;
|
||||
virtual bool StatusIsFatal() const;
|
||||
static void SetGlobalError(Error::Code code,
|
||||
const wpi::Twine& contextMessage,
|
||||
static void SetGlobalError(Error::Code code, const wpi::Twine& contextMessage,
|
||||
wpi::StringRef filename, wpi::StringRef function,
|
||||
int lineNumber);
|
||||
static void SetGlobalWPIError(const wpi::Twine& errorMessage,
|
||||
|
||||
@@ -23,16 +23,16 @@ namespace frc {
|
||||
* used types of filters.
|
||||
*
|
||||
* Filters are of the form:<br>
|
||||
* y[n] = (b0 * x[n] + b1 * x[n-1] + … + bP * x[n-P]) -
|
||||
* (a0 * y[n-1] + a2 * y[n-2] + … + aQ * y[n-Q])
|
||||
* y[n] = (b0 * x[n] + b1 * x[n-1] + … + bP * x[n-P]) -
|
||||
* (a0 * y[n-1] + a2 * y[n-2] + … + aQ * y[n-Q])
|
||||
*
|
||||
* Where:<br>
|
||||
* y[n] is the output at time "n"<br>
|
||||
* x[n] is the input at time "n"<br>
|
||||
* y[n-1] is the output from the LAST time step ("n-1")<br>
|
||||
* x[n-1] is the input from the LAST time step ("n-1")<br>
|
||||
* b0 … bP are the "feedforward" (FIR) gains<br>
|
||||
* a0 … aQ are the "feedback" (IIR) gains<br>
|
||||
* b0 … bP are the "feedforward" (FIR) gains<br>
|
||||
* a0 … aQ are the "feedback" (IIR) gains<br>
|
||||
* IMPORTANT! Note the "-" sign in front of the feedback term! This is a common
|
||||
* convention in signal processing.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2017 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2018 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. */
|
||||
|
||||
@@ -144,8 +144,7 @@ class SendableBuilder {
|
||||
* @param setter setter function (sets new value)
|
||||
*/
|
||||
virtual void AddValueProperty(
|
||||
const wpi::Twine& key,
|
||||
std::function<std::shared_ptr<nt::Value>()> getter,
|
||||
const wpi::Twine& key, std::function<std::shared_ptr<nt::Value>()> getter,
|
||||
std::function<void(std::shared_ptr<nt::Value>)> setter) = 0;
|
||||
|
||||
/**
|
||||
@@ -169,8 +168,7 @@ class SendableBuilder {
|
||||
*/
|
||||
virtual void AddSmallBooleanArrayProperty(
|
||||
const wpi::Twine& key,
|
||||
std::function<wpi::ArrayRef<int>(wpi::SmallVectorImpl<int>& buf)>
|
||||
getter,
|
||||
std::function<wpi::ArrayRef<int>(wpi::SmallVectorImpl<int>& buf)> getter,
|
||||
std::function<void(wpi::ArrayRef<int>)> setter) = 0;
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,8 +105,7 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
std::function<void(wpi::StringRef)> setter) override;
|
||||
|
||||
void AddValueProperty(
|
||||
const wpi::Twine& key,
|
||||
std::function<std::shared_ptr<nt::Value>()> getter,
|
||||
const wpi::Twine& key, std::function<std::shared_ptr<nt::Value>()> getter,
|
||||
std::function<void(std::shared_ptr<nt::Value>)> setter) override;
|
||||
|
||||
void AddSmallStringProperty(
|
||||
@@ -116,8 +115,7 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
|
||||
void AddSmallBooleanArrayProperty(
|
||||
const wpi::Twine& key,
|
||||
std::function<wpi::ArrayRef<int>(wpi::SmallVectorImpl<int>& buf)>
|
||||
getter,
|
||||
std::function<wpi::ArrayRef<int>(wpi::SmallVectorImpl<int>& buf)> getter,
|
||||
std::function<void(wpi::ArrayRef<int>)> setter) override;
|
||||
|
||||
void AddSmallDoubleArrayProperty(
|
||||
|
||||
@@ -50,8 +50,7 @@ class SmartDashboard : public SensorBase {
|
||||
static double GetNumber(wpi::StringRef keyName, double defaultValue);
|
||||
|
||||
static bool PutString(wpi::StringRef keyName, wpi::StringRef value);
|
||||
static bool SetDefaultString(wpi::StringRef key,
|
||||
wpi::StringRef defaultValue);
|
||||
static bool SetDefaultString(wpi::StringRef key, wpi::StringRef defaultValue);
|
||||
static std::string GetString(wpi::StringRef keyName,
|
||||
wpi::StringRef defaultValue);
|
||||
|
||||
@@ -64,8 +63,8 @@ class SmartDashboard : public SensorBase {
|
||||
static bool PutNumberArray(wpi::StringRef key, wpi::ArrayRef<double> value);
|
||||
static bool SetDefaultNumberArray(wpi::StringRef key,
|
||||
wpi::ArrayRef<double> defaultValue);
|
||||
static std::vector<double> GetNumberArray(
|
||||
wpi::StringRef key, wpi::ArrayRef<double> defaultValue);
|
||||
static std::vector<double> GetNumberArray(wpi::StringRef key,
|
||||
wpi::ArrayRef<double> defaultValue);
|
||||
|
||||
static bool PutStringArray(wpi::StringRef key,
|
||||
wpi::ArrayRef<std::string> value);
|
||||
|
||||
@@ -47,9 +47,8 @@ bool wpi_assertEqual_impl(int valueA, int valueB,
|
||||
bool wpi_assertNotEqual_impl(int valueA, int valueB,
|
||||
const wpi::Twine& valueAString,
|
||||
const wpi::Twine& valueBString,
|
||||
const wpi::Twine& message,
|
||||
wpi::StringRef fileName, int lineNumber,
|
||||
wpi::StringRef funcName);
|
||||
const wpi::Twine& message, wpi::StringRef fileName,
|
||||
int lineNumber, wpi::StringRef funcName);
|
||||
|
||||
void wpi_suspendOnAssertEnabled(bool enabled);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user