Move CameraServer and WPILib headers into their own folder

The old headers were moved into folders because doing so avoids polluting
the system include directories.

Folder names were also normalized to lowercase.
This commit is contained in:
Tyler Veness
2018-07-20 00:03:45 -07:00
committed by Peter Johnson
parent 31ced30c1e
commit d89b7dd412
728 changed files with 1876 additions and 1851 deletions

View File

@@ -0,0 +1,22 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 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
namespace frc {
namespace sim {
namespace lowfi {
class EncoderSim {
public:
virtual void SetPosition(double position) = 0;
virtual void SetVelocity(double velocity) = 0;
};
} // namespace lowfi
} // namespace sim
} // namespace frc

View File

@@ -0,0 +1,30 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 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 "EncoderSim.h"
#include "MotorSim.h"
namespace frc {
namespace sim {
namespace lowfi {
class MotorEncoderConnector {
public:
MotorEncoderConnector(MotorSim& motorController, EncoderSim& encoder);
void Update();
private:
MotorSim& motorSimulator;
EncoderSim& encoderSimulator;
};
} // namespace lowfi
} // namespace sim
} // namespace frc

View File

@@ -0,0 +1,23 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 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
namespace frc {
namespace sim {
namespace lowfi {
class MotorSim {
public:
virtual double GetPosition() const = 0;
virtual double GetVelocity() const = 0;
virtual double GetAcceleration() const = 0;
};
} // namespace lowfi
} // namespace sim
} // namespace frc

View File

@@ -0,0 +1,28 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 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
namespace frc {
namespace sim {
namespace lowfi {
class MotorModel {
public:
virtual void Reset() = 0;
virtual void SetVoltage(double voltage) = 0;
virtual void Update(double elapsedTime) = 0;
virtual double GetPosition() const = 0;
virtual double GetVelocity() const = 0;
virtual double GetAcceleration() const = 0;
virtual double GetCurrent() const = 0;
};
} // namespace lowfi
} // namespace sim
} // namespace frc

View File

@@ -0,0 +1,40 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 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 "lowfisim/motormodel/MotorModel.h"
namespace frc {
namespace sim {
namespace lowfi {
class SimpleMotorModel : public MotorModel {
public:
explicit SimpleMotorModel(double maxSpeed);
void Reset() override;
void SetVoltage(double voltage) override;
void Update(double elapsedTime) override;
double GetPosition() const override;
double GetVelocity() const override;
double GetAcceleration() const override;
double GetCurrent() const override;
protected:
double m_maxSpeed;
double m_voltagePercentage{0};
double m_position{0};
double m_velocity{0};
static constexpr double kMaxExpectedVoltage = 12;
};
} // namespace lowfi
} // namespace sim
} // namespace frc

View File

@@ -0,0 +1,30 @@
/*----------------------------------------------------------------------------*/
/* 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. */
/*----------------------------------------------------------------------------*/
#pragma once
#include "lowfisim/EncoderSim.h"
#include "simulation/EncoderSim.h"
namespace frc {
namespace sim {
namespace lowfi {
class WpiEncoderSim : public EncoderSim {
public:
explicit WpiEncoderSim(int index);
void SetPosition(double position) override;
void SetVelocity(double velocity) override;
protected:
frc::sim::EncoderSim m_encoderSimulator;
};
} // namespace lowfi
} // namespace sim
} // namespace frc

View File

@@ -0,0 +1,36 @@
/*----------------------------------------------------------------------------*/
/* 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. */
/*----------------------------------------------------------------------------*/
#pragma once
#include "lowfisim/MotorSim.h"
#include "lowfisim/motormodel/MotorModel.h"
#include "simulation/PWMSim.h"
namespace frc {
namespace sim {
namespace lowfi {
class WpiMotorSim : public MotorSim {
public:
explicit WpiMotorSim(int index, MotorModel& motorModelSimulator);
void Update(double elapsedTime);
double GetPosition() const override;
double GetVelocity() const override;
double GetAcceleration() const override;
private:
MotorModel& m_motorModelSimulation;
frc::sim::PWMSim m_pwmSimulator;
static constexpr double kDefaultVoltage = 12.0;
};
} // namespace lowfi
} // namespace sim
} // namespace frc