RCKit
AccelStepperPositionSetter.h
1 // AccelStepperPositionSetter.h
2 //
3 // Setter class that outputs its value to set the position of an AccelStepper
4 /// \author Mike McCauley (mikem@airspayce.com)
5 ///
6 // Copyright (C) 2010 Mike McCauley
7 // $Id: AccelStepperPositionSetter.h,v 1.3 2018/09/17 23:09:57 mikem Exp mikem $
8 
9 #ifndef AccelStepperPositionSetter_h
10 #define AccelStepperPositionSetter_h
11 
12 #include "Setter.h"
13 
14 class AccelStepper;
15 
16 /////////////////////////////////////////////////////////////////////
17 /// \class AccelStepperPositionSetter AccelStepperPositionSetter.h <AccelStepperPositionSetter.h>
18 /// \brief Setter class that outputs its value to set the position 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  AccelStepperPositionSetter(AccelStepper* stepper);
28 
29  /// Input the value to be used to set the stepper position.
30  /// \param[in] value The input value to be used to set the position of the stepper.
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
AccelStepperPositionSetter::input
virtual void input(int value)
Definition: AccelStepperPositionSetter.cpp:19
AccelStepperPositionSetter::AccelStepperPositionSetter
AccelStepperPositionSetter(AccelStepper *stepper)
Definition: AccelStepperPositionSetter.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
AccelStepperPositionSetter
Setter class that outputs its value to set the position of an AccelStepper.
Definition: AccelStepperPositionSetter.h:22