gramods
|
Analogs filter that re-maps analog indices to a standard order for application compatibility between tracker systems. More...
#include <AnalogsMapper.hh>
Classes | |
struct | AnalogIndex |
Standard analogs indices, for compatibility. More... | |
Public Member Functions | |
void | setAnalogsTracker (std::shared_ptr< AnalogsTracker > bt) |
Sets the analogs tracker to re-map. More... | |
void | addMapping (gmCore::size2 m) |
Adds a mapping in the form of two integer indices: from and to button index, respectively. More... | |
void | setVerticalAnalog (int idx) |
Sets which analog to map to vertical analog, as an index starting at zero. More... | |
void | setHorizontalAnalog (int idx) |
Sets which analog to map to horizontal analog, as an index starting at zero. More... | |
void | setTriggerAnalog (int idx) |
Sets which analog to map to trigger analog, as an index starting at zero. More... | |
bool | getAnalogs (AnalogsSample &p) override |
Replaces the contents of p with button data. More... | |
void | traverse (Visitor *visitor) override |
Propagates the specified visitor. More... | |
![]() | |
virtual std::string | getDefaultKey () override |
Returns the default key, in Configuration, for the Object. More... | |
![]() | |
Object () | |
Initializes internal data. More... | |
virtual | ~Object () |
Cleaning up internal data. More... | |
virtual void | initialize () |
Called to initialize the Object. More... | |
virtual void | accept (Visitor *visitor) |
Calls the visitors apply method with this as argument. More... | |
bool | isInitialized () |
Returns true if the Object is initialized. More... | |
Static Public Attributes | |
static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Additional Inherited Members | |
![]() | |
typedef std::chrono::steady_clock | clock |
Analogs filter that re-maps analog indices to a standard order for application compatibility between tracker systems.
Preferred order is vertical, horizontal and then trigger, followed by any other analog input.
void gramods::gmTrack::AnalogsMapper::addMapping | ( | gmCore::size2 | m | ) |
Adds a mapping in the form of two integer indices: from and to button index, respectively.
XML-attribute: mapping
|
overridevirtual |
Replaces the contents of p with button data.
Returns true if data could be read, false otherwise. Use sample time to check if data are fresh.
Implements gramods::gmTrack::AnalogsTracker.
void gramods::gmTrack::AnalogsMapper::setAnalogsTracker | ( | std::shared_ptr< AnalogsTracker > | bt | ) |
Sets the analogs tracker to re-map.
XML-attribute: analogsTracker
void gramods::gmTrack::AnalogsMapper::setHorizontalAnalog | ( | int | idx | ) |
Sets which analog to map to horizontal analog, as an index starting at zero.
XML-attribute: horizontalAnalog
void gramods::gmTrack::AnalogsMapper::setTriggerAnalog | ( | int | idx | ) |
Sets which analog to map to trigger analog, as an index starting at zero.
XML-attribute: triggerAnalog
void gramods::gmTrack::AnalogsMapper::setVerticalAnalog | ( | int | idx | ) |
Sets which analog to map to vertical analog, as an index starting at zero.
XML-attribute: verticalAnalog
|
overridevirtual |
Propagates the specified visitor.
Reimplemented from gramods::gmCore::Object.