[build] Upgrade CI to clang-format 10.0 (#1961)

MacOS no longer ships 6.0, and Arch Linux's mesa GPU drivers are no longer compatible with LLVM 6.0.
This commit is contained in:
Tyler Veness
2020-06-27 20:39:00 -07:00
committed by GitHub
parent 9796987d59
commit 22c0e2813a
62 changed files with 613 additions and 435 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -52,8 +52,8 @@ double AnalogAccelerometer::PIDGet() { return GetAcceleration(); }
void AnalogAccelerometer::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Accelerometer");
builder.AddDoubleProperty("Value", [=]() { return GetAcceleration(); },
nullptr);
builder.AddDoubleProperty(
"Value", [=]() { return GetAcceleration(); }, nullptr);
}
void AnalogAccelerometer::InitAccelerometer() {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 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. */
@@ -96,9 +96,9 @@ void AnalogEncoder::Reset() {
void AnalogEncoder::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("AbsoluteEncoder");
builder.AddDoubleProperty("Distance", [this] { return this->GetDistance(); },
nullptr);
builder.AddDoubleProperty("Distance Per Rotation",
[this] { return this->GetDistancePerRotation(); },
nullptr);
builder.AddDoubleProperty(
"Distance", [this] { return this->GetDistance(); }, nullptr);
builder.AddDoubleProperty(
"Distance Per Rotation",
[this] { return this->GetDistancePerRotation(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -230,6 +230,6 @@ void AnalogInput::SetSimDevice(HAL_SimDeviceHandle device) {
void AnalogInput::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Analog Input");
builder.AddDoubleProperty("Value", [=]() { return GetAverageVoltage(); },
nullptr);
builder.AddDoubleProperty(
"Value", [=]() { return GetAverageVoltage(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2014-2020 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. */
@@ -69,6 +69,7 @@ int AnalogOutput::GetChannel() { return m_channel; }
void AnalogOutput::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Analog Output");
builder.AddDoubleProperty("Value", [=]() { return GetVoltage(); },
[=](double value) { SetVoltage(value); });
builder.AddDoubleProperty(
"Value", [=]() { return GetVoltage(); },
[=](double value) { SetVoltage(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2014-2020 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. */
@@ -43,7 +43,10 @@ double BuiltInAccelerometer::GetZ() { return HAL_GetAccelerometerZ(); }
void BuiltInAccelerometer::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("3AxisAccelerometer");
builder.AddDoubleProperty("X", [=]() { return GetX(); }, nullptr);
builder.AddDoubleProperty("Y", [=]() { return GetY(); }, nullptr);
builder.AddDoubleProperty("Z", [=]() { return GetZ(); }, nullptr);
builder.AddDoubleProperty(
"X", [=]() { return GetX(); }, nullptr);
builder.AddDoubleProperty(
"Y", [=]() { return GetY(); }, nullptr);
builder.AddDoubleProperty(
"Z", [=]() { return GetZ(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2014-2020 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. */
@@ -206,13 +206,14 @@ void Compressor::ClearAllPCMStickyFaults() {
void Compressor::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Compressor");
builder.AddBooleanProperty("Enabled", [=]() { return Enabled(); },
[=](bool value) {
if (value)
Start();
else
Stop();
});
builder.AddBooleanProperty(
"Enabled", [=]() { return Enabled(); },
[=](bool value) {
if (value)
Start();
else
Stop();
});
builder.AddBooleanProperty(
"Pressure switch", [=]() { return GetPressureSwitchValue(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -332,5 +332,6 @@ bool Counter::GetDirection() const {
void Counter::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Counter");
builder.AddDoubleProperty("Value", [=]() { return Get(); }, nullptr);
builder.AddDoubleProperty(
"Value", [=]() { return Get(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -73,5 +73,6 @@ int DigitalInput::GetChannel() const { return m_channel; }
void DigitalInput::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Digital Input");
builder.AddBooleanProperty("Value", [=]() { return Get(); }, nullptr);
builder.AddBooleanProperty(
"Value", [=]() { return Get(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -154,6 +154,6 @@ void DigitalOutput::SetSimDevice(HAL_SimDeviceHandle device) {
void DigitalOutput::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Digital Output");
builder.AddBooleanProperty("Value", [=]() { return Get(); },
[=](bool value) { Set(value); });
builder.AddBooleanProperty(
"Value", [=]() { return Get(); }, [=](bool value) { Set(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 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. */
@@ -93,8 +93,8 @@ int DutyCycle::GetSourceChannel() const { return m_source->GetChannel(); }
void DutyCycle::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Duty Cycle");
builder.AddDoubleProperty("Frequency",
[this] { return this->GetFrequency(); }, nullptr);
builder.AddDoubleProperty("Output", [this] { return this->GetOutput(); },
nullptr);
builder.AddDoubleProperty(
"Frequency", [this] { return this->GetFrequency(); }, nullptr);
builder.AddDoubleProperty(
"Output", [this] { return this->GetOutput(); }, nullptr);
}

View File

@@ -130,11 +130,11 @@ void DutyCycleEncoder::SetConnectedFrequencyThreshold(int frequency) {
void DutyCycleEncoder::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("AbsoluteEncoder");
builder.AddDoubleProperty("Distance", [this] { return this->GetDistance(); },
nullptr);
builder.AddDoubleProperty("Distance Per Rotation",
[this] { return this->GetDistancePerRotation(); },
nullptr);
builder.AddDoubleProperty("Is Connected",
[this] { return this->IsConnected(); }, nullptr);
builder.AddDoubleProperty(
"Distance", [this] { return this->GetDistance(); }, nullptr);
builder.AddDoubleProperty(
"Distance Per Rotation",
[this] { return this->GetDistancePerRotation(); }, nullptr);
builder.AddDoubleProperty(
"Is Connected", [this] { return this->IsConnected(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -236,11 +236,12 @@ void Encoder::InitSendable(SendableBuilder& builder) {
else
builder.SetSmartDashboardType("Encoder");
builder.AddDoubleProperty("Speed", [=]() { return GetRate(); }, nullptr);
builder.AddDoubleProperty("Distance", [=]() { return GetDistance(); },
nullptr);
builder.AddDoubleProperty("Distance per Tick",
[=]() { return GetDistancePerPulse(); }, nullptr);
builder.AddDoubleProperty(
"Speed", [=]() { return GetRate(); }, nullptr);
builder.AddDoubleProperty(
"Distance", [=]() { return GetDistance(); }, nullptr);
builder.AddDoubleProperty(
"Distance per Tick", [=]() { return GetDistancePerPulse(); }, nullptr);
}
void Encoder::InitEncoder(bool reverseDirection, EncodingType encodingType) {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -25,5 +25,6 @@ double GyroBase::PIDGet() {
void GyroBase::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Gyro");
builder.AddDoubleProperty("Value", [=]() { return GetAngle(); }, nullptr);
builder.AddDoubleProperty(
"Value", [=]() { return GetAngle(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 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. */
@@ -70,6 +70,6 @@ void NidecBrushless::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Nidec Brushless");
builder.SetActuator(true);
builder.SetSafeState([=]() { StopMotor(); });
builder.AddDoubleProperty("Value", [=]() { return Get(); },
[=](double value) { Set(value); });
builder.AddDoubleProperty(
"Value", [=]() { return Get(); }, [=](double value) { Set(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -229,16 +229,17 @@ void PIDBase::PIDWrite(double output) { SetSetpoint(output); }
void PIDBase::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("PIDController");
builder.SetSafeState([=]() { Reset(); });
builder.AddDoubleProperty("p", [=]() { return GetP(); },
[=](double value) { SetP(value); });
builder.AddDoubleProperty("i", [=]() { return GetI(); },
[=](double value) { SetI(value); });
builder.AddDoubleProperty("d", [=]() { return GetD(); },
[=](double value) { SetD(value); });
builder.AddDoubleProperty("f", [=]() { return GetF(); },
[=](double value) { SetF(value); });
builder.AddDoubleProperty("setpoint", [=]() { return GetSetpoint(); },
[=](double value) { SetSetpoint(value); });
builder.AddDoubleProperty(
"p", [=]() { return GetP(); }, [=](double value) { SetP(value); });
builder.AddDoubleProperty(
"i", [=]() { return GetI(); }, [=](double value) { SetI(value); });
builder.AddDoubleProperty(
"d", [=]() { return GetD(); }, [=](double value) { SetD(value); });
builder.AddDoubleProperty(
"f", [=]() { return GetF(); }, [=](double value) { SetF(value); });
builder.AddDoubleProperty(
"setpoint", [=]() { return GetSetpoint(); },
[=](double value) { SetSetpoint(value); });
}
void PIDBase::Calculate() {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -80,6 +80,7 @@ void PIDController::Reset() {
void PIDController::InitSendable(SendableBuilder& builder) {
PIDBase::InitSendable(builder);
builder.AddBooleanProperty("enabled", [=]() { return IsEnabled(); },
[=](bool value) { SetEnabled(value); });
builder.AddBooleanProperty(
"enabled", [=]() { return IsEnabled(); },
[=](bool value) { SetEnabled(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -199,6 +199,7 @@ void PWM::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("PWM");
builder.SetActuator(true);
builder.SetSafeState([=]() { SetDisabled(); });
builder.AddDoubleProperty("Value", [=]() { return GetRaw(); },
[=](double value) { SetRaw(value); });
builder.AddDoubleProperty(
"Value", [=]() { return GetRaw(); },
[=](double value) { SetRaw(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -35,6 +35,7 @@ void PWMSpeedController::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Speed Controller");
builder.SetActuator(true);
builder.SetSafeState([=]() { SetDisabled(); });
builder.AddDoubleProperty("Value", [=]() { return GetSpeed(); },
[=](double value) { SetSpeed(value); });
builder.AddDoubleProperty(
"Value", [=]() { return GetSpeed(); },
[=](double value) { SetSpeed(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2014-2020 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. */
@@ -139,10 +139,11 @@ void PowerDistributionPanel::ClearStickyFaults() {
void PowerDistributionPanel::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("PowerDistributionPanel");
for (int i = 0; i < SensorUtil::kPDPChannels; ++i) {
builder.AddDoubleProperty("Chan" + wpi::Twine(i),
[=]() { return GetCurrent(i); }, nullptr);
builder.AddDoubleProperty(
"Chan" + wpi::Twine(i), [=]() { return GetCurrent(i); }, nullptr);
}
builder.AddDoubleProperty("Voltage", [=]() { return GetVoltage(); }, nullptr);
builder.AddDoubleProperty("TotalCurrent", [=]() { return GetTotalCurrent(); },
nullptr);
builder.AddDoubleProperty(
"Voltage", [=]() { return GetVoltage(); }, nullptr);
builder.AddDoubleProperty(
"TotalCurrent", [=]() { return GetTotalCurrent(); }, nullptr);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -57,8 +57,8 @@ double Servo::GetMinAngle() const { return kMinServoAngle; }
void Servo::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Servo");
builder.AddDoubleProperty("Value", [=]() { return Get(); },
[=](double value) { Set(value); });
builder.AddDoubleProperty(
"Value", [=]() { return Get(); }, [=](double value) { Set(value); });
}
double Servo::GetServoAngleRange() const {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -93,6 +93,6 @@ void Solenoid::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Solenoid");
builder.SetActuator(true);
builder.SetSafeState([=]() { Set(false); });
builder.AddBooleanProperty("Value", [=]() { return Get(); },
[=](bool value) { Set(value); });
builder.AddBooleanProperty(
"Value", [=]() { return Get(); }, [=](bool value) { Set(value); });
}

View File

@@ -66,6 +66,6 @@ void SpeedControllerGroup::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Speed Controller");
builder.SetActuator(true);
builder.SetSafeState([=]() { StopMotor(); });
builder.AddDoubleProperty("Value", [=]() { return Get(); },
[=](double value) { Set(value); });
builder.AddDoubleProperty(
"Value", [=]() { return Get(); }, [=](double value) { Set(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -177,8 +177,8 @@ void Ultrasonic::SetPIDSourceType(PIDSourceType pidSource) {
void Ultrasonic::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Ultrasonic");
builder.AddDoubleProperty("Value", [=]() { return GetRangeInches(); },
nullptr);
builder.AddDoubleProperty(
"Value", [=]() { return GetRangeInches(); }, nullptr);
}
void Ultrasonic::Initialize() {

View File

@@ -119,12 +119,13 @@ void PIDController::Reset() {
void PIDController::InitSendable(frc::SendableBuilder& builder) {
builder.SetSmartDashboardType("PIDController");
builder.AddDoubleProperty("p", [this] { return GetP(); },
[this](double value) { SetP(value); });
builder.AddDoubleProperty("i", [this] { return GetI(); },
[this](double value) { SetI(value); });
builder.AddDoubleProperty("d", [this] { return GetD(); },
[this](double value) { SetD(value); });
builder.AddDoubleProperty("setpoint", [this] { return GetSetpoint(); },
[this](double value) { SetSetpoint(value); });
builder.AddDoubleProperty(
"p", [this] { return GetP(); }, [this](double value) { SetP(value); });
builder.AddDoubleProperty(
"i", [this] { return GetI(); }, [this](double value) { SetI(value); });
builder.AddDoubleProperty(
"d", [this] { return GetD(); }, [this](double value) { SetD(value); });
builder.AddDoubleProperty(
"setpoint", [this] { return GetSetpoint(); },
[this](double value) { SetSetpoint(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 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. */
@@ -216,9 +216,9 @@ void DifferentialDrive::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("DifferentialDrive");
builder.SetActuator(true);
builder.SetSafeState([=] { StopMotor(); });
builder.AddDoubleProperty("Left Motor Speed",
[=]() { return m_leftMotor->Get(); },
[=](double value) { m_leftMotor->Set(value); });
builder.AddDoubleProperty(
"Left Motor Speed", [=]() { return m_leftMotor->Get(); },
[=](double value) { m_leftMotor->Set(value); });
builder.AddDoubleProperty(
"Right Motor Speed",
[=]() { return m_rightMotor->Get() * m_rightSideInvertMultiplier; },

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 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. */
@@ -107,13 +107,13 @@ void KilloughDrive::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("KilloughDrive");
builder.SetActuator(true);
builder.SetSafeState([=] { StopMotor(); });
builder.AddDoubleProperty("Left Motor Speed",
[=]() { return m_leftMotor->Get(); },
[=](double value) { m_leftMotor->Set(value); });
builder.AddDoubleProperty("Right Motor Speed",
[=]() { return m_rightMotor->Get(); },
[=](double value) { m_rightMotor->Set(value); });
builder.AddDoubleProperty("Back Motor Speed",
[=]() { return m_backMotor->Get(); },
[=](double value) { m_backMotor->Set(value); });
builder.AddDoubleProperty(
"Left Motor Speed", [=]() { return m_leftMotor->Get(); },
[=](double value) { m_leftMotor->Set(value); });
builder.AddDoubleProperty(
"Right Motor Speed", [=]() { return m_rightMotor->Get(); },
[=](double value) { m_rightMotor->Set(value); });
builder.AddDoubleProperty(
"Back Motor Speed", [=]() { return m_backMotor->Get(); },
[=](double value) { m_backMotor->Set(value); });
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 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. */
@@ -120,9 +120,9 @@ void MecanumDrive::InitSendable(SendableBuilder& builder) {
[=](double value) {
m_frontRightMotor->Set(value * m_rightSideInvertMultiplier);
});
builder.AddDoubleProperty("Rear Left Motor Speed",
[=]() { return m_rearLeftMotor->Get(); },
[=](double value) { m_rearLeftMotor->Set(value); });
builder.AddDoubleProperty(
"Rear Left Motor Speed", [=]() { return m_rearLeftMotor->Get(); },
[=](double value) { m_rearLeftMotor->Set(value); });
builder.AddDoubleProperty(
"Rear Right Motor Speed",
[=]() { return m_rearRightMotor->Get() * m_rightSideInvertMultiplier; },

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 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. */
@@ -30,7 +30,7 @@ void AddToSendableRegistry(frc::Sendable* sendable, std::string name) {
} // namespace detail
void SendableCameraWrapper::InitSendable(SendableBuilder& builder) {
builder.AddStringProperty(".ShuffleboardURI", [this] { return m_uri; },
nullptr);
builder.AddStringProperty(
".ShuffleboardURI", [this] { return m_uri; }, nullptr);
}
} // namespace frc