Use units for new NotifierCommand (#1869)

This commit is contained in:
Peter Johnson
2019-09-04 22:54:49 -05:00
committed by GitHub
parent 5ffe15d5ff
commit 3e0f7d0995
3 changed files with 8 additions and 5 deletions

View File

@@ -9,6 +9,8 @@
#include <frc/Notifier.h>
#include <units/units.h>
#include "CommandBase.h"
#include "CommandHelper.h"
@@ -29,10 +31,10 @@ class NotifierCommand : public CommandHelper<CommandBase, NotifierCommand> {
* Creates a new NotifierCommand.
*
* @param toRun the runnable for the notifier to run
* @param period the period at which the notifier should run, in seconds
* @param period the period at which the notifier should run
* @param requirements the subsystems required by this command
*/
NotifierCommand(std::function<void()> toRun, double period,
NotifierCommand(std::function<void()> toRun, units::second_t period,
std::initializer_list<Subsystem*> requirements);
NotifierCommand(NotifierCommand&& other);
@@ -46,6 +48,6 @@ class NotifierCommand : public CommandHelper<CommandBase, NotifierCommand> {
private:
std::function<void()> m_toRun;
frc::Notifier m_notifier;
double m_period;
units::second_t m_period;
};
} // namespace frc2