Fixed stm32 variants not compiling due to ltoa missing . https://github.com/meshcore-dev/MeshCore/pull/2655#issuecomment-5714564192
This commit is contained in:
1 parent
9c728e6b64
commit
8073a9db25
2 files changed
+9
-1
No files matched your search
@@ -133,6 +133,7 @@ build_flags = ${arduino_base.build_flags}
|
||||
-D STM32_PLATFORM
|
||||
-I src/helpers/stm32
|
||||
-I $PROJECT_PACKAGES_DIR/framework-arduinoststm32/libraries/SubGhz/src
|
||||
-fpermissive
|
||||
build_src_filter = ${arduino_base.build_src_filter}
|
||||
+<helpers/stm32>
|
||||
lib_deps = ${arduino_base.lib_deps}
|
||||
|
||||
@@ -102,9 +102,16 @@ static void _ftoa(float f, char *p, int *status)
|
||||
*p++ = '0';
|
||||
else
|
||||
{
|
||||
ltoa(int_part, p, 10);
|
||||
#if defined(STM32_PLATFORM)
|
||||
int written = snprintf(p, 16, "%" PRId32, int_part);
|
||||
if (written > 0) {
|
||||
p += written;
|
||||
}
|
||||
#else
|
||||
ltoa(int_part, p, 10);
|
||||
while (*p)
|
||||
p++;
|
||||
#endif
|
||||
}
|
||||
*p++ = '.';
|
||||
if (frac_part == 0)
|
||||
|
||||
Reference in new issue
Block a user