Radio frequencies (24 GHz) were displaying as "2.42e4 MHz" instead of "24200.0 MHz" because Float.round/2 returns a float that Phoenix converts to scientific notation for large numbers. Changed format_sensor_value/2 to use :erlang.float_to_binary/2 with decimals: 1 option, which formats as a string and avoids scientific notation. Verified: 24200.0 now displays as "24200.0" instead of "2.42e4" Reviewed-on: graham/towerops-web#114 |
||
|---|---|---|
| .. | ||
| form.ex | ||
| form.html.heex | ||
| index.ex | ||
| index.html.heex | ||
| show.ex | ||
| show.html.heex | ||