2020-12-26 14:12:05 -08:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
2017-10-17 21:37:58 -07:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2025-11-07 19:56:21 -05:00
|
|
|
#include "wpi/commands2/CommandPtr.hpp"
|
|
|
|
|
#include "wpi/commands2/SubsystemBase.hpp"
|
2017-10-17 21:37:58 -07:00
|
|
|
|
2023-09-14 23:56:48 -04:00
|
|
|
class ExampleSubsystem : public frc2::SubsystemBase {
|
2018-05-13 17:09:56 -07:00
|
|
|
public:
|
|
|
|
|
ExampleSubsystem();
|
2019-08-25 23:55:59 -04:00
|
|
|
|
2022-12-15 19:40:14 +02:00
|
|
|
/**
|
|
|
|
|
* Example command factory method.
|
|
|
|
|
*/
|
|
|
|
|
frc2::CommandPtr ExampleMethodCommand();
|
|
|
|
|
|
2022-12-26 21:28:06 +02:00
|
|
|
/**
|
|
|
|
|
* An example method querying a boolean state of the subsystem (for example, a
|
|
|
|
|
* digital sensor).
|
|
|
|
|
*
|
|
|
|
|
* @return value of some boolean subsystem state, such as a digital sensor.
|
|
|
|
|
*/
|
|
|
|
|
bool ExampleCondition();
|
|
|
|
|
|
2019-08-25 23:55:59 -04:00
|
|
|
/**
|
|
|
|
|
* Will be called periodically whenever the CommandScheduler runs.
|
|
|
|
|
*/
|
|
|
|
|
void Periodic() override;
|
|
|
|
|
|
2020-07-10 21:21:31 -07:00
|
|
|
/**
|
|
|
|
|
* Will be called periodically whenever the CommandScheduler runs during
|
|
|
|
|
* simulation.
|
|
|
|
|
*/
|
|
|
|
|
void SimulationPeriodic() override;
|
|
|
|
|
|
2018-05-13 17:09:56 -07:00
|
|
|
private:
|
2019-08-25 23:55:59 -04:00
|
|
|
// Components (e.g. motor controllers and sensors) should generally be
|
|
|
|
|
// declared private and exposed only through public methods.
|
2017-10-17 21:37:58 -07:00
|
|
|
};
|