AMK_motor_drive_software 1.0.0
Loading...
Searching...
No Matches
Potentiometer Class Reference

Class to represent a potentiometer, providing methods to read and calculate RPM and torque values. More...

#include <Potentiometer.hpp>

Public Member Functions

 Potentiometer ()
 Constructor for the Potentiometer class.
 
void update ()
 Updates the potentiometer reading and calculates RPM, positive torque, and negative torque.
 
int16_t getRpm () const
 Gets the calculated RPM value.
 
int16_t getTorquePos () const
 Gets the positive torque value.
 
int16_t getTorqueNeg () const
 Gets the negative torque value.
 
int getRawValue () const
 Gets the raw analog value from the potentiometer.
 

Detailed Description

Class to represent a potentiometer, providing methods to read and calculate RPM and torque values.

Constructor & Destructor Documentation

◆ Potentiometer()

Potentiometer::Potentiometer ( )

Constructor for the Potentiometer class.

Member Function Documentation

◆ getRawValue()

int Potentiometer::getRawValue ( ) const

Gets the raw analog value from the potentiometer.

Returns
The raw analog value read from the potentiometer.

◆ getRpm()

int16_t Potentiometer::getRpm ( ) const

Gets the calculated RPM value.

Returns
The RPM value calculated based on the potentiometer reading.

◆ getTorqueNeg()

int16_t Potentiometer::getTorqueNeg ( ) const

Gets the negative torque value.

Returns
The negative torque limit value calculated based on the potentiometer reading.

◆ getTorquePos()

int16_t Potentiometer::getTorquePos ( ) const

Gets the positive torque value.

Returns
The positive torque limit value calculated based on the potentiometer reading.

◆ update()

void Potentiometer::update ( )

Updates the potentiometer reading and calculates RPM, positive torque, and negative torque.


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