Skip to content
Snippets Groups Projects

Correct RT130 disk usage display

Merged Lan Dam requested to merge i148_disk_usage_display into master
2 files
+ 14
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -9,7 +9,7 @@ from matplotlib.backends.backend_qt5agg import (
FigureCanvasQTAgg as Canvas)
from sohstationviewer.controller.plotting_data import (
get_time_ticks, get_unit_bitweight)
get_time_ticks, get_unit_bitweight, get_disk_size_format)
from sohstationviewer.conf import constants
from sohstationviewer.view.util.color import clr
@@ -299,6 +299,13 @@ class PlottingAxes:
:param max_y: maximum of y values
:param chan_db_info: info of channel from database
"""
if chan_db_info['channel'].startswith('Disk Usage'):
ax.set_yticks([org_min_y, org_max_y])
min_y_label = get_disk_size_format(org_min_y)
max_y_label = get_disk_size_format(org_max_y)
ax.set_yticklabels([min_y_label, max_y_label])
return
if chan_db_info['channel'] == 'GPS Lk/Unlk':
# to avoid case that the channel doesn't have Lk or Unlk
# preset min, max value so that GPS Clock Power is always in the
Loading