SendData hex number
Posted: Sun Nov 09, 2025 6:53 pm
I’ve got a reproducible glitch: without a timestamp the value is fine, add a timestamp and the Y value shows up as a hex.
// OK → numeric shown correctly (e.g., 25)
gT1.SendData("temp1", (float)t1_C);
// NOT OK → arrives as hex
gT1.SendData("temp1", ts.c_str(), (float)t1_C);
Targeting this per docs:
SendData(SeriesName, TimeStamp, YValue, SeriesProperties — optional)
Environment
Teensy 4.1
ts is a std::string (ASCII, no NULs), lifetime valid
Series name is a RAM string (no F() macro)
Tried
Explicit casts:
gT1.SendData("temp1", ts.c_str(), static_cast<float>(t1_C));
gT1.SendData("temp1", ts.c_str(), static_cast<double>(t1_C));
Ask
For the timestamped call, does YValue need to be a specific type?
Is there an overload-resolution trap where (const char*, float) binds to a variant that treats the float as raw bytes?
What timestamp format does this overload expect (epoch ms, ISO-8601, etc.) to keep YValue parsed as numeric?
What’s the exact prototype I should be hitting for (SeriesName, TimeStamp, YValue)?
Thanks for your help!
// OK → numeric shown correctly (e.g., 25)
gT1.SendData("temp1", (float)t1_C);
// NOT OK → arrives as hex
gT1.SendData("temp1", ts.c_str(), (float)t1_C);
Targeting this per docs:
SendData(SeriesName, TimeStamp, YValue, SeriesProperties — optional)
Environment
Teensy 4.1
ts is a std::string (ASCII, no NULs), lifetime valid
Series name is a RAM string (no F() macro)
Tried
Explicit casts:
gT1.SendData("temp1", ts.c_str(), static_cast<float>(t1_C));
gT1.SendData("temp1", ts.c_str(), static_cast<double>(t1_C));
Ask
For the timestamped call, does YValue need to be a specific type?
Is there an overload-resolution trap where (const char*, float) binds to a variant that treats the float as raw bytes?
What timestamp format does this overload expect (epoch ms, ISO-8601, etc.) to keep YValue parsed as numeric?
What’s the exact prototype I should be hitting for (SeriesName, TimeStamp, YValue)?
Thanks for your help!