Skip to content

Set proper initial values for many SensorProperties

Arjen Hiemstra requested to merge work/ahiemstra/initialvalue into master

SensorProperty in libksysguard was changed to reset the value of a sensor on unsubscribe. However, this caused a number of "static" sensors to break and only provide their value once. To fix this, SensorProperty will now only reset the value if a valid initial value was provided.

This changes many SensorProperties to have valid initial values. This has been applied primarily to sensors that are very volatile and which provide a different value almost every update, like the various rate sensors as well as the usage percentage sensors. For these sensors, it is unlikely thata a historical value makes any sense.

Other sensors, like memory usage, are less volatile and will generally not vary wildly, so providing a historical value for those seems better than an empty value.

BUG: 446414

Merge request reports