Control Surface master
MIDI Control Surface library for Arduino
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
VPotState Struct Reference

#include <MIDI_Inputs/MCU/VPotRing.hpp>

Detailed Description

Struct that keeps track of the value and overload indicator of a Mackie Control Universal VPot LED ring.

Definition at line 14 of file VPotRing.hpp.

+ Collaboration diagram for VPotState:

Data access

uint8_t getPosition () const
 Return the position of the V-Pot ring. [0, 11]. More...
 
bool getCenterLed () const
 Return the status of the center LED of the V-Pot ring. More...
 
Mode getMode () const
 Return the mode of the V-Pot ring. More...
 
uint8_t getStartOn () const
 Get the first segment that should be on. More...
 
uint8_t getStartOff () const
 Get the first segment that should be off. More...
 

Public Types

enum  Mode { SingleDot = 0 , BoostCut = 1 , Wrap = 2 , Spread = 3 }
 Determines how the VPot value is displayed using the LEDs. More...
 

Public Member Functions

 VPotState (uint8_t value=0)
 Constructor. More...
 
bool update (uint8_t data)
 

Static Public Member Functions

static uint8_t sanitizeData (uint8_t data)
 Make sure that the received value is valid and will not result in array out of bounds conditions. More...
 

Public Attributes

uint8_t value
 The value representing the VPot position, mode and LED. More...
 

Member Enumeration Documentation

◆ Mode

enum Mode

Determines how the VPot value is displayed using the LEDs.

Enumerator
SingleDot 

Single dot.

BoostCut 

Boost/Cut.

Wrap 

Wrap.

Spread 

Spread.

Definition at line 28 of file VPotRing.hpp.

Constructor & Destructor Documentation

◆ VPotState()

VPotState ( uint8_t  value = 0)
inline

Constructor.

Definition at line 16 of file VPotRing.hpp.

Member Function Documentation

◆ update()

bool update ( uint8_t  data)
inline

Definition at line 20 of file VPotRing.hpp.

◆ getPosition()

uint8_t getPosition ( ) const
inline

Return the position of the V-Pot ring. [0, 11].

Definition at line 39 of file VPotRing.hpp.

◆ getCenterLed()

bool getCenterLed ( ) const
inline

Return the status of the center LED of the V-Pot ring.

Definition at line 41 of file VPotRing.hpp.

◆ getMode()

Mode getMode ( ) const
inline

Return the mode of the V-Pot ring.

Definition at line 43 of file VPotRing.hpp.

◆ getStartOn()

uint8_t getStartOn ( ) const
inline

Get the first segment that should be on.

Definition at line 46 of file VPotRing.hpp.

◆ getStartOff()

uint8_t getStartOff ( ) const
inline

Get the first segment that should be off.

Definition at line 61 of file VPotRing.hpp.

◆ sanitizeData()

static uint8_t sanitizeData ( uint8_t  data)
inlinestatic

Make sure that the received value is valid and will not result in array out of bounds conditions.

Definition at line 76 of file VPotRing.hpp.

Member Data Documentation

◆ value

uint8_t value

The value representing the VPot position, mode and LED.

Definition at line 18 of file VPotRing.hpp.


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