Panel cleanup: chip padding up a step and a tighter chip line gap, corrected/SNR numbers neutral until amber or red, dB margin casing, compound elapsed units (1m39s) ending the minutes/metres m collision, noise chip shows presence only
This commit is contained in:
@@ -101,15 +101,16 @@ func scaleCount(v uint64) string {
|
||||
|
||||
// The same shape for time, whose magnitudes are sixties and twenty-fours.
|
||||
func scaleTime(d time.Duration) string {
|
||||
s := int(d.Seconds())
|
||||
switch {
|
||||
case d < time.Minute:
|
||||
return fmt.Sprintf("%.2f s", d.Seconds())
|
||||
return fmt.Sprintf("%ds", s)
|
||||
case d < time.Hour:
|
||||
return fmt.Sprintf("%.2f m", d.Minutes())
|
||||
return fmt.Sprintf("%dm%02ds", s/60, s%60)
|
||||
case d < 24*time.Hour:
|
||||
return fmt.Sprintf("%.2f h", d.Hours())
|
||||
return fmt.Sprintf("%dh%02dm", s/3600, (s/60)%60)
|
||||
}
|
||||
return fmt.Sprintf("%.2f d", d.Hours()/24)
|
||||
return fmt.Sprintf("%dd%02dh", s/86400, (s/3600)%24)
|
||||
}
|
||||
|
||||
type colSpec struct {
|
||||
@@ -282,7 +283,7 @@ func snrCell(phy phyDisplay) string {
|
||||
s := fmt.Sprintf("%+.1f", phy.worstMargin)
|
||||
switch snrClass(phy.worstMargin) {
|
||||
case clsGood:
|
||||
return paint(s, cGreen)
|
||||
return s
|
||||
case clsWarn:
|
||||
return paint(s, cYellow)
|
||||
default:
|
||||
@@ -292,7 +293,7 @@ func snrCell(phy phyDisplay) string {
|
||||
|
||||
func correctedCell(v uint64) string {
|
||||
if v == 0 {
|
||||
return paint("0", cGreen)
|
||||
return "0"
|
||||
}
|
||||
return paint(commas(v), cYellow)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user