RSeries astromech firmware
Welder Class Reference

#include <body/Welder.h>

Detailed Description

Controls a relay to a spark gap igniter to create some actual sparking.

Smoke will run for a maximum of 6.5 seconds with a minimum of 5 minute pause in between activations.

ANIMATION(welder)
{
// Welder arm
DO_COMMAND("WLARM")
// Welder on
DO_COMMAND("WLON")
// Fake being dead for 8 seconds
// Ok We are back!
DO_COMMAND("ST$0109")
// Close pies
// Close pie panels
servoDispatch.moveServosTo(PIE_PANELS_MASK, 150, 100, 2400);
})
}
+ Inheritance diagram for Welder:
+ Collaboration diagram for Welder:

Public Member Functions

 Welder (byte idPin, byte relayPin)
 Constructor. More...
 
bool isAttached ()
 
void welderArm ()
 Arm Welder. More...
 
void welderDisarm ()
 Disarm welder. More...
 
void welderOn ()
 Turn on the welder. More...
 
void welderOff ()
 Turn off the smoke machine. More...
 
virtual void handleCommand (const char *cmd) override
 Welder Commands start with 'WL'. More...
 
virtual void animate () override
 Perform a single frame of welder animation. More...
 
- Public Member Functions inherited from CommandEvent
 CommandEvent ()
 Default Constructor. More...
 
virtual void handleCommand (String cmd)
 Subclasses should implement this function to process commands specific to their device. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CommandEvent
static void process (char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (const char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (PROGMEMString pcmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 

Constructor & Destructor Documentation

◆ Welder()

Welder::Welder ( byte  idPin,
byte  relayPin 
)
inline

Constructor.

Member Function Documentation

◆ animate()

virtual void Welder::animate ( )
inlineoverridevirtual

Perform a single frame of welder animation.

Implements AnimatedEvent.

◆ handleCommand()

virtual void Welder::handleCommand ( const char *  cmd)
inlineoverridevirtual

Welder Commands start with 'WL'.

Implements CommandEvent.

◆ isAttached()

bool Welder::isAttached ( )
inline

◆ welderArm()

void Welder::welderArm ( )
inline

Arm Welder.

◆ welderDisarm()

void Welder::welderDisarm ( )
inline

Disarm welder.

◆ welderOff()

void Welder::welderOff ( )
inline

Turn off the smoke machine.

◆ welderOn()

void Welder::welderOn ( )
inline

Turn on the welder.


The documentation for this class was generated from the following file:
DO_START
#define DO_START()
Definition: Animation.h:15
DO_ONCE
#define DO_ONCE(p)
Definition: Animation.h:19
ANIMATION
#define ANIMATION(name)
Definition: Animation.h:14
DO_WAIT_SEC
#define DO_WAIT_SEC(sec)
Definition: Animation.h:25
DO_END
#define DO_END()
Definition: Animation.h:39
DO_COMMAND
#define DO_COMMAND(cmd)
Definition: Animation.h:34