PU2CLR AKC695X Arduino Library  1.0.2
This is an Arduino Library to control the AKC695X / M695X DSP radio devices
Tools Methods

Functions

void AKC695X::convertToChar (uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true)
 Converts a number to a char array. More...
 

Detailed Description

Format

Function Documentation

◆ convertToChar()

void AKC695X::convertToChar ( uint16_t  value,
char *  strValue,
uint8_t  len,
uint8_t  dot,
uint8_t  separator,
bool  remove_leading_zeros = true 
)

Converts a number to a char array.

It is useful to mitigate memory space used by functions like sprintf or othetr generic similar functions

You can use it to format frequency using decimal or tousand separator and also to convert smalm numbers.

Parameters
valuevalue to be converted
strValuechar array that will be receive the converted value
lenfinal string size (in bytes)
dotthe decimal or tousand separator position
separatorsymbol "." or ","
remove_leading_zerosif true removes up to two leading zeros