When printing data to the terminal (using the -t flag) the current line is written over the previous line. When the digits change in length, the line becomes a mixture of the current and previous lines. For example, note the "W)W)" and "Wattss" in the following line:
Total Power: 8.50 Watts (CPU: 8.50 W)W) /\ 0.30 Wattss
I think the most straightforward way to address this would be to use an ANSI escape code to erase the current line (https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797) - say, printing ANSI ESC[0K after printing the carriage return. Though of course there are several other ways this could be fixed.
When printing data to the terminal (using the -t flag) the current line is written over the previous line. When the digits change in length, the line becomes a mixture of the current and previous lines. For example, note the "W)W)" and "Wattss" in the following line:
I think the most straightforward way to address this would be to use an ANSI escape code to erase the current line (https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797) - say, printing ANSI ESC[0K after printing the carriage return. Though of course there are several other ways this could be fixed.