FastLED 3.10.9
Loading...
Searching...
No Matches

◆ accept() [7/10]

template<typename Sink>
void fl::SerializerVisitor< Sink >::accept ( const float & f)
inline

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

1309 {
1310#if FL_PLATFORM_HAS_LARGE_MEMORY
1311 // Integer-only bits -> decimal (FastLED #3022 phase 2). Default 3-digit
1312 // precision matches the previous `num_str.append(f, 3)` contract.
1314#else
1315 // Low-memory targets gate the float decimal codec to drop
1316 // `ieee754_format_decimal` (594 B) + `kPow10Mant` LUT (824 B) from the
1317 // link. The integer-only RPC contract on LPC8xx / AVR-class targets
1318 // never serializes float values; this writes a stub for the rare cases
1319 // where a `json(float)` round-trip happens to be exercised in test
1320 // code that also runs on Low-memory. See FastLED #3082.
1321 (void)f;
1322 append_str(fl::string("0"));
1323#endif
1324 }
void append_str(const fl::string &str) FL_NO_EXCEPT

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

+ Here is the call graph for this function: