Note the 8 digit fraction for the temperature value. This is because toJson converts float records with SENML_MAX_DOUBLE_PRECISION . Which is 8 by default , and can be set as a compile time option.
However
That sets the precision for all float / double records.
With lora transmisison, every byte counts. So it would be a good practice to be able to set the precision for each specific float or double.
Hence this feature suggestion:
Add precision to the float / double record constructors with default SENML_MAX_DOUBLE_PRECISION
An example record:
2133 ms: Sending 44 bytes: [{"i":-24,"v":22.60000038},{"i":5,"v":76}]
Note the 8 digit fraction for the temperature value. This is because toJson converts float records with SENML_MAX_DOUBLE_PRECISION . Which is 8 by default , and can be set as a compile time option. However That sets the precision for all float / double records.
With lora transmisison, every byte counts. So it would be a good practice to be able to set the precision for each specific float or double.
Hence this feature suggestion:
Add precision to the float / double record constructors with default SENML_MAX_DOUBLE_PRECISION
define MYPRECISION 2
SenMLFloatRecord temprec(THINGSML_TEMPERATURE, MYPRECISION);
I will try to make a branch