RCKit
AccelStepperSpeedSetter.h
1 // AccelStepperSpeedSetter.h
2 //
3 // Setter class that outputs its value to set the speed of an AccelStepper
4 /// \author Mike McCauley (mikem@airspayce.com)
5 ///
6 // Copyright (C) 2010 Mike McCauley
7 // $Id: AccelStepperSpeedSetter.h,v 1.3 2018/09/17 23:09:57 mikem Exp mikem $
8 
9 #ifndef AccelStepperSpeedSetter_h
10 #define AccelStepperSpeedSetter_h
11 
12 #include "Setter.h"
13 
14 class AccelStepper;
15 
16 /////////////////////////////////////////////////////////////////////
17 /// \class AccelStepperSpeedSetter AccelStepperSpeedSetter.h <AccelStepperSpeedSetter.h>
18 /// \brief Setter class that outputs its value to set the speed of an AccelStepper
19 ///
20 /// Requires the AccelStepper library seehttp://www.airspayce.com/mikem/arduino/AccelStepper/
21 ///
23 {
24 public:
25  /// \param[in] stepper The target AccelStepper instance. It is the callers job to configure
26  /// the AccelStepper
27  AccelStepperSpeedSetter(AccelStepper* stepper);
28 
29  /// Input the value to be used to set the stepper speed.
30  /// \param[in] value The inpout value to be used to set the speed of the stepper in steps per second.
31  // Positive is clockwise.
32  virtual void input(int value);
33 
34 protected:
35 
36 private:
37  /// The AccelStepper to be set by this Setter
38  AccelStepper* _stepper;
39 };
40 
41 #endif
AccelStepperSpeedSetter
Setter class that outputs its value to set the speed of an AccelStepper.
Definition: AccelStepperSpeedSetter.h:22
AccelStepperSpeedSetter::input
virtual void input(int value)
Definition: AccelStepperSpeedSetter.cpp:19
AccelStepperSpeedSetter::AccelStepperSpeedSetter
AccelStepperSpeedSetter(AccelStepper *stepper)
Definition: AccelStepperSpeedSetter.cpp:13
Setter
Virtual base class for classes that receive a value, maybe transform it and then do something with it...
Definition: Setter.h:25