Skip to content
Commit 3bbcc529 authored by Brian Norris's avatar Brian Norris Committed by Zhang Rui
Browse files

tools/thermal: tmon: fixup tui windowing calculations



The number of rows in the dialog vary according to the number of cooling
devices. However, some of the windowing computations were assuming a
fixed number of rows. This computation is OK when we have between 4 and
9 cooling devices (and they wrap to the next column), but with fewer
devices, we end up printing off the end of the window.

This unifies the row computation into a single function and uses that
throughout the TUI code. This also accounts for increasing the number of
rows when there are more than 9 total cooling devices.

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Acked-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 0e7b766d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment