OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
BatteryStatus Struct Reference

Battery status. More...

#include <InternalTypes.hpp>

Public Member Functions

constexpr bool operator== (const BatteryStatus &other) const noexcept
 Compare for equality.
 
void reset () noexcept
 Reset to unknown.
 

Public Attributes

std::optional< uint8_t > stateOfCharge {}
 Measured battery level in the range from 0% to 100%.
 
std::optional< bool > isCharging {}
 True if the battery is being charged.
 
std::optional< bool > isBatteryPresent {}
 False if the battery is not connected.
 
std::optional< bool > usingExternalPower {}
 True if there is wired power.
 

Detailed Description

Battery status.

Definition at line 404 of file InternalTypes.hpp.

Member Function Documentation

◆ operator==()

bool BatteryStatus::operator== ( const BatteryStatus & other) const
inlineconstexprnoexcept

Compare for equality.

Parameters
otherAnother battery status
Returns
true If equal
false If non-equal

Definition at line 423 of file InternalTypes.hpp.

◆ reset()

void BatteryStatus::reset ( )
inlinenoexcept

Reset to unknown.

Definition at line 435 of file InternalTypes.hpp.

Member Data Documentation

◆ isBatteryPresent

std::optional<bool> BatteryStatus::isBatteryPresent {}

False if the battery is not connected.

Definition at line 412 of file InternalTypes.hpp.

◆ isCharging

std::optional<bool> BatteryStatus::isCharging {}

True if the battery is being charged.

Definition at line 410 of file InternalTypes.hpp.

◆ stateOfCharge

std::optional<uint8_t> BatteryStatus::stateOfCharge {}

Measured battery level in the range from 0% to 100%.

Definition at line 408 of file InternalTypes.hpp.

◆ usingExternalPower

std::optional<bool> BatteryStatus::usingExternalPower {}

True if there is wired power.

Definition at line 414 of file InternalTypes.hpp.


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