MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4Power Class Reference

Class for managing battery power settings and retrieval. More...

#include <MiniR4Power.h>

Public Member Functions

 MiniR4Power ()
 
bool setBattCell (uint8_t cell)
 Sets the battery parameters based on the number of cells.
 
float getBattVoltage (void)
 Retrieves the current battery voltage.
 
float getBattPercentage (void)
 Retrieves the current battery percentage.
 

Detailed Description

Class for managing battery power settings and retrieval.

This class provides methods to set battery parameters based on the number of cells and to retrieve the current battery voltage and percentage.

Definition at line 17 of file MiniR4Power.h.

Constructor & Destructor Documentation

◆ MiniR4Power()

MiniR4Power::MiniR4Power ( )
inline

Definition at line 20 of file MiniR4Power.h.

Member Function Documentation

◆ getBattPercentage()

float MiniR4Power::getBattPercentage ( void )
inline

Retrieves the current battery percentage.

Returns
The percentage of battery charge, or 0 if retrieval failed.

Definition at line 59 of file MiniR4Power.h.

◆ getBattVoltage()

float MiniR4Power::getBattVoltage ( void )
inline

Retrieves the current battery voltage.

Returns
The voltage of the battery, or 0 if retrieval failed.

Definition at line 45 of file MiniR4Power.h.

◆ setBattCell()

bool MiniR4Power::setBattCell ( uint8_t cell)
inline

Sets the battery parameters based on the number of cells.

Parameters
cellThe number of 18650 battery cells (2-6).
Returns
true if the parameters were set successfully, false otherwise.

Definition at line 28 of file MiniR4Power.h.


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