DCAITI Robot Hardware  1.0
Static Public Member Functions | List of all members
Utils Class Reference

#include <Utils.hpp>

Static Public Member Functions

static float bytesToFloat (uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3)
 converts 4 bytes to float (big endian) More...
 
static uint32_t bytesToInt (uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3)
 converts 4 bytes to uint32_t (big endian) More...
 

Member Function Documentation

◆ bytesToFloat()

float Utils::bytesToFloat ( uint8_t  b0,
uint8_t  b1,
uint8_t  b2,
uint8_t  b3 
)
static

converts 4 bytes to float (big endian)

converts a float to a byte array

Parameters
b0first byte
b1second byte
b2third byte
b3fourth byte
Returns
float
Parameters
b0
b1
b2
b3
Returns
float
Here is the caller graph for this function:

◆ bytesToInt()

uint32_t Utils::bytesToInt ( uint8_t  b0,
uint8_t  b1,
uint8_t  b2,
uint8_t  b3 
)
static

converts 4 bytes to uint32_t (big endian)

converts a byte array to a float

Parameters
b0first byte
b1second byte
b2third byte
b3fourth byte
Returns
uint32_t
Parameters
b0
b1
b2
b3
Returns
uint32_t
Here is the caller graph for this function:

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