Skip to content
8 changes: 8 additions & 0 deletions changelog/v2.18.2/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [Changes](#changes)
- [RENESAS](#renesas)
- [Fixes](#fixes)
- [Improvements](#improvements)
- [NEW HARDWARE](#new-hardware)

### <font color=red>RENESAS</font>
Expand Down Expand Up @@ -76,6 +77,13 @@
+ All Renesas MCU families now work correctly with AGT pins which are used as PWM channels.


### Improvements

+ Improvements and fixes in `conversions.c`
+ Fixed comparison bugs and an uninitialized variable in the string-to-number conversion functions
+ Added a new fixed-precision float-to-string conversion function - `float_to_str_prec()`
+ Renamed variables for clarity and applied consistent comparison style throughout

### NEW HARDWARE

> NOTE:
Expand Down
14 changes: 14 additions & 0 deletions platform/conversions/lib/include/conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ extern "C"{

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#ifdef __GNUC__
#include <me_built_in.h>
#endif
Expand Down Expand Up @@ -325,6 +326,19 @@ char * l_trim( char * string );
*/
uint8_t float_to_str( float f_num, char * string);

/**
* @brief Converts floating point number into string with defined precision
*
* @param f_num - floating point number to be converted
* @param string - pointer to a string where converted number is stored
* @param size - size of the string buffer
* @param precision - number of decimal places to include
* @return uint8_t : 0 - conversion ok (fnum is not +INF, -INF or NaN)
* 1 - if fnum is +INF
* 2 - if fnum is -INF
* 3 - if fnum is NaN
*/
int float_to_str_prec(float value, char *str, size_t size, uint8_t precision);
/**
* @brief Converts string into uint8
*
Expand Down
Loading
Loading