AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
Loading...
Searching...
No Matches
LEDBlinkAction Class Reference

Example of a non-send action that blinks an LED. More...

#include <non_send_action.h>

Inheritance diagram for LEDBlinkAction:
Action

Public Member Functions

 LEDBlinkAction (ILEDController &led, uint32_t blinkCount=3, uint32_t blinkDuration=200)
 Constructs an LEDBlinkAction.
 
void execute () override
 Executes the LED blink action.
 
bool isSendAction () const override
 Checks if this action is a send action.
 
- Public Member Functions inherited from Action
void setName (const std::string &n)
 
const std::string & getName () const
 
bool hasName () const
 
virtual Type getType () const
 
virtual uint32_t getDelay () const
 
virtual bool isInProgress () const
 Returns true if the action is currently in progress (e.g.
 
virtual void getJsonProperties (JsonObject &json) const
 
virtual ~Action ()=default
 

Additional Inherited Members

- Public Types inherited from Action
enum class  Type : uint8_t {
  Unknown , SendString , SendChar , SendKey ,
  SendMediaKey , SerialOutput , Delayed
}
 

Detailed Description

Example of a non-send action that blinks an LED.

Demonstrates how to create actions that don't involve keyboard input.

Definition at line 11 of file non_send_action.h.

Constructor & Destructor Documentation

◆ LEDBlinkAction()

LEDBlinkAction::LEDBlinkAction ( ILEDController led,
uint32_t  blinkCount = 3,
uint32_t  blinkDuration = 200 
)

Constructs an LEDBlinkAction.

Parameters
ledReference to LED controller
blinkCountNumber of times to blink
blinkDurationDuration of each blink in milliseconds

Definition at line 6 of file non_send_action.cpp.

Member Function Documentation

◆ execute()

void LEDBlinkAction::execute ( )
overridevirtual

Executes the LED blink action.

Blinks the LED the specified number of times.

Implements Action.

Definition at line 11 of file non_send_action.cpp.

◆ isSendAction()

bool LEDBlinkAction::isSendAction ( ) const
inlineoverridevirtual

Checks if this action is a send action.

Returns
false since this is not a send action

Reimplemented from Action.

Definition at line 40 of file non_send_action.h.


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