Data Gator
Hardware and software documentation for the Data Gator project.
Loading...
Searching...
No Matches
ufloat88 Struct Reference

Defines structure for floating point numbers in dual 8 bit upper/lower format. More...

#include <KKM_K6P.hpp>

Public Member Functions

std::string toString ()
 Convert struct members upper and lower to a string double value.
 

Public Attributes

int8_t upper = 0x00
 the value to the left of the decimal point
 
uint8_t lower = 0x00
 the value to the right of the decimal point
 

Detailed Description

Defines structure for floating point numbers in dual 8 bit upper/lower format.

Uses the toString member to convert the upper and lower 8 bit values to a string of format <upper>.<lower> to represent a double.

For example:

// note this is pseudo code!
str a = ufloat88.toString() // value of a = "2.5"
int reset_count
number of resets retrieved for NVS
Definition scheduler.hpp:31
Defines structure for floating point numbers in dual 8 bit upper/lower format.
Definition KKM_K6P.hpp:44
int8_t upper
the value to the left of the decimal point
Definition KKM_K6P.hpp:45
std::string toString()
Convert struct members upper and lower to a string double value.
Definition KKM_K6P.hpp:53
uint8_t lower
the value to the right of the decimal point
Definition KKM_K6P.hpp:46

Member Function Documentation

◆ toString()

std::string ufloat88::toString ( )
inline

Convert struct members upper and lower to a string double value.

Returns
A string value of form <upper_int>.<lower_int>.

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