Peritoneal Dialysis Capstone
Controlling catheter for peritoneal dialysis
Loading...
Searching...
No Matches
PotentiometerInput Class Reference

The implementation of IInput. More...

#include <PotentiometerInput.h>

Inheritance diagram for PotentiometerInput:
Collaboration diagram for PotentiometerInput:

Public Member Functions

 PotentiometerInput (IHAL &hal, int pin)
 Configures a pin as a potentiometer input.
float getValue () override
 Samples this input.
Public Member Functions inherited from IInput
virtual ~IInput ()=default

Private Attributes

IHALm_hal
int m_pin

Detailed Description

The implementation of IInput.

Constructor & Destructor Documentation

◆ PotentiometerInput()

PotentiometerInput::PotentiometerInput ( IHAL & hal,
int pin )

Configures a pin as a potentiometer input.

Parameters
halA reference to the hardware abstraction layer.
pinThe pin number.

Member Function Documentation

◆ getValue()

float PotentiometerInput::getValue ( )
overridevirtual

Samples this input.

Returns
The floating-point value of this input, normalized to the range [0, 1].

Implements IInput.

Member Data Documentation

◆ m_hal

IHAL& PotentiometerInput::m_hal
private

◆ m_pin

int PotentiometerInput::m_pin
private

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