FastLED 3.9.15
Loading...
Searching...
No Matches

◆ accept() [7/10]

void fl::SerializerVisitor::accept ( const float & f)
inline

Definition at line 1179 of file json.cpp.hpp.

1179 {
1180#if FL_PLATFORM_HAS_LARGE_MEMORY
1181 // Integer-only bits -> decimal (FastLED #3022 phase 2). Default 3-digit
1182 // precision matches the previous `num_str.append(f, 3)` contract.
1184#else
1185 // Low-memory targets gate the float decimal codec to drop
1186 // `ieee754_format_decimal` (594 B) + `kPow10Mant` LUT (824 B) from the
1187 // link. The integer-only RPC contract on LPC8xx / AVR-class targets
1188 // never serializes float values; this writes a stub for the rare cases
1189 // where a `json(float)` round-trip happens to be exercised in test
1190 // code that also runs on Low-memory. See FastLED #3082.
1191 (void)f;
1192 append_str(fl::string("0"));
1193#endif
1194 }
fl::string ieee754_format_decimal(u32 bits, int precision) FL_NOEXCEPT
Format IEEE 754 single-precision bits as decimal text.
To bit_cast(const From &from) FL_NOEXCEPT
Definition bit_cast.h:48
void append_str(const fl::string &str)

References append_str(), fl::bit_cast(), and fl::ieee754_format_decimal().

+ Here is the call graph for this function: