mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Move applicable integration tests to native build as unit tests (#1364)
This commit is contained in:
committed by
Peter Johnson
parent
e89d5eb692
commit
99e0f08a6f
@@ -1,30 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/SpeedController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
class MockSpeedController : public SpeedController {
|
||||
public:
|
||||
void Set(double speed) override;
|
||||
double Get() const override;
|
||||
void SetInverted(bool isInverted) override;
|
||||
bool GetInverted() const override;
|
||||
void Disable() override;
|
||||
void StopMotor() override;
|
||||
|
||||
void PIDWrite(double output) override;
|
||||
|
||||
private:
|
||||
double m_speed = 0.0;
|
||||
bool m_isInverted = false;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
@@ -56,14 +56,4 @@ class TestBench {
|
||||
/* PCM channels */
|
||||
static const int32_t kSolenoidChannel1 = 0;
|
||||
static const int32_t kSolenoidChannel2 = 1;
|
||||
|
||||
/* Filter constants */
|
||||
static constexpr double kFilterStep = 0.005;
|
||||
static constexpr double kFilterTime = 2.0;
|
||||
static constexpr double kSinglePoleIIRTimeConstant = 0.015915;
|
||||
static constexpr double kSinglePoleIIRExpectedOutput = -3.2172003;
|
||||
static constexpr double kHighPassTimeConstant = 0.006631;
|
||||
static constexpr double kHighPassExpectedOutput = 10.074717;
|
||||
static constexpr int32_t kMovAvgTaps = 6;
|
||||
static constexpr double kMovAvgExpectedOutput = -10.191644;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user