Public Member Functions | List of all members
ServoGoAndReturn Class Reference

Behaviour that sets a servo to an angle before returning its position back to zero, for a number of cycles specified as its argument. More...

#include <ServoBehaviours.h>

Inheritance diagram for ServoGoAndReturn:
Behaviour

Public Member Functions

char * args ()
 
 ServoGoAndReturn (Servo servo, String name="GoAndReturn", int delay=30, int pause=500, int start_angle=2, int end_angle=178)
 
String start (String args)
 
void update ()
 
- Public Member Functions inherited from Behaviour
 Behaviour (String name)
 
virtual boolean is_background ()
 
virtual boolean is_interruptable ()
 
virtual boolean is_priority ()
 
virtual boolean is_running ()
 
virtual boolean is_temp ()
 
virtual String name ()
 
virtual void stop ()
 
 ~Behaviour ()
 

Additional Inherited Members

- Protected Attributes inherited from Behaviour
boolean _background = false
 
boolean _interruptable = true
 
String _name = "name"
 
boolean _priority = false
 
boolean _running = false
 
boolean _temp = false
 

Detailed Description

Behaviour that sets a servo to an angle before returning its position back to zero, for a number of cycles specified as its argument.

Constructor & Destructor Documentation

◆ ServoGoAndReturn()

ServoGoAndReturn::ServoGoAndReturn ( Servo  servo,
String  name = "GoAndReturn",
int  delay = 30,
int  pause = 500,
int  start_angle = 2,
int  end_angle = 178 
)

Member Function Documentation

◆ args()

char* ServoGoAndReturn::args ( )
virtual

What arguments does the behaviour take? Override this to document your behaviour.

Reimplemented from Behaviour.

◆ start()

String ServoGoAndReturn::start ( String  args)
virtual

Start the behaviour, with arguments.

Reimplemented from Behaviour.

◆ update()

void ServoGoAndReturn::update ( )
virtual

Update the behaviour periodically.

Reimplemented from Behaviour.


The documentation for this class was generated from the following file: