Skip to content

chargethresholdhelper: Filter out batteries without thresholds early

Fabian Vogt requested to merge work/fvogt/kde464535 into master

Previously, getBatteries() returned all batteries, even those without support for thresholds. While getthreshold simply skipped those where reading fails, setthreshold exited early on the first failure, leaving the remaining batteries untouched.

By already performing filtering in getBatteries(), this should now behave more consistently and work also if not all batteries support thresholds.

BUG: 464535

Draft because not tested, no supported hardware here.

Merge request reports

Loading