micro-ELC
Public Member Functions | Public Attributes | List of all members
TachometerJEncoder Class Reference

This class measures the speed of a generator using a tachometer. More...

#include <TachometerJEncoder.h>

Inheritance diagram for TachometerJEncoder:
Inheritance graph
[legend]
Collaboration diagram for TachometerJEncoder:
Collaboration graph
[legend]

Public Member Functions

 TachometerJEncoder (JEncoder &_encoder, uint16_t numSavedForSmoothing=0)
 This class measures the speed of a generator using any JEncoder from the JMotor library. More...
 
float getMeasurement ()
 Use this method to get the most recent measurement on the speed of the generator. More...
 
void run ()
 call this in loop() since some forms of measurement may need to be constantly polled More...
 
virtual float getMeasurement ()=0
 Use this method to get the most recent measurement on the speed of the generator. More...
 
virtual void run ()=0
 call this in loop() since some forms of measurement may need to be constantly polled More...
 

Public Attributes

JEncoder & encoder
 

Detailed Description

This class measures the speed of a generator using a tachometer.

Note
you may use any of these encoders.

Constructor & Destructor Documentation

◆ TachometerJEncoder()

TachometerJEncoder::TachometerJEncoder ( JEncoder &  _encoder,
uint16_t  numSavedForSmoothing = 0 
)
inline

This class measures the speed of a generator using any JEncoder from the JMotor library.

Parameters
_encoderreference to JEncoder object
numSavedForSmoothingdefault (0) average this many readings

Member Function Documentation

◆ getMeasurement()

float TachometerJEncoder::getMeasurement ( )
inlinevirtual

Use this method to get the most recent measurement on the speed of the generator.

Return values
measurement(float)

Implements Measurement.

◆ run()

void TachometerJEncoder::run ( )
inlinevirtual

call this in loop() since some forms of measurement may need to be constantly polled

Implements Measurement.

Member Data Documentation

◆ encoder

JEncoder& TachometerJEncoder::encoder

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