Commanders
Arduino buttons/bus library
ButtonsCommanderAnalogPushesItem Class Reference

#include "ButtonsCommanderAnalogPushesItem.hpp"

Inheritance diagram for ButtonsCommanderAnalogPushesItem:
ButtonsCommanderButton

Public Member Functions

 ButtonsCommanderAnalogPushesItem (unsigned long inId = 0)
 
void begin (unsigned long inId, int inAnalogValue, int inTolerancy)
 
bool IsPushed (int inCurrentValue)
 
int GetAnalogValue ()
 
- Public Member Functions inherited from ButtonsCommanderButton
 ButtonsCommanderButton (unsigned long inId)
 
unsigned long GetId () const
 
virtual ButtonsCommanderButton * GetFromId (unsigned long inId)
 
virtual int GetPosition () const
 
virtual void beforeFirstLoop ()
 
virtual unsigned long loop ()
 
virtual void EndLoop ()
 
void SetNextButton (ButtonsCommanderButton *inpButton)
 
ButtonsCommanderButton * GetNextButton () const
 

Additional Inherited Members

- Protected Attributes inherited from ButtonsCommanderButton
unsigned long Id
 

Detailed Description

This class describes a push item part of a ButtonsCommanderAnalogPushes class.

Constructor & Destructor Documentation

ButtonsCommanderAnalogPushesItem::ButtonsCommanderAnalogPushesItem ( unsigned long  inId = 0)
inline

Default constructor.

Parameters
inIdid of this button.

Member Function Documentation

void ButtonsCommanderAnalogPushesItem::begin ( unsigned long  inId,
int  inAnalogValue,
int  inTolerancy 
)
inline

Initialize the instance.

Parameters
inIdid of this button.
inAnalogValueAnalog value associated with this button.
inTolerancytolerance of the read analog value to identify this push button.
int ButtonsCommanderAnalogPushesItem::GetAnalogValue ( )
inline

Gets the reference analog value for this button.

bool ButtonsCommanderAnalogPushesItem::IsPushed ( int  inCurrentValue)

Checks if the given value is in the interval [value-tolerance , value+tolerance].

Parameters
inCurrentValuevalue to check.
Returns
true in the given value is in the interval.

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