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.

Definition at line 12 of file ButtonsCommanderAnalogPushesItem.hpp.

Constructor & Destructor Documentation

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

Default constructor.

Parameters
inIdid of this button.

Definition at line 22 of file ButtonsCommanderAnalogPushesItem.hpp.

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.

Definition at line 29 of file ButtonsCommanderAnalogPushesItem.hpp.

int ButtonsCommanderAnalogPushesItem::GetAnalogValue ( )
inline

Gets the reference analog value for this button.

Definition at line 36 of file ButtonsCommanderAnalogPushesItem.hpp.

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.

Definition at line 11 of file ButtonsCommanderAnalogPushesItem.cpp.


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