Remove broken charge limit override

This commit is contained in:
Stephen Horvath
2026-01-12 22:00:36 +10:00
parent a0ba66ab99
commit 8453f41914
4 changed files with 2 additions and 31 deletions

View File

@@ -34,8 +34,6 @@ class BatteryLimiterPage(Gtk.Box):
bat_limit = Gtk.Template.Child() bat_limit = Gtk.Template.Child()
bat_limit_label = Gtk.Template.Child() bat_limit_label = Gtk.Template.Child()
bat_limit_scale = Gtk.Template.Child() bat_limit_scale = Gtk.Template.Child()
chg_limit_override = Gtk.Template.Child()
chg_limit_override_btn = Gtk.Template.Child()
bat_ext_group = Gtk.Template.Child() bat_ext_group = Gtk.Template.Child()
bat_ext_enable = Gtk.Template.Child() bat_ext_enable = Gtk.Template.Child()
@@ -61,7 +59,6 @@ class BatteryLimiterPage(Gtk.Box):
self.bat_limit_label.set_label(f"{ec_limit[1]}%") self.bat_limit_label.set_label(f"{ec_limit[1]}%")
self.chg_limit.set_sensitive(True) self.chg_limit.set_sensitive(True)
self.bat_limit.set_sensitive(True) self.bat_limit.set_sensitive(True)
self.chg_limit_override.set_sensitive(True)
def handle_chg_limit_change(min, max): def handle_chg_limit_change(min, max):
ec_commands.framework_laptop.set_charge_limit( ec_commands.framework_laptop.set_charge_limit(
@@ -79,7 +76,6 @@ class BatteryLimiterPage(Gtk.Box):
self.chg_limit.set_sensitive(active) self.chg_limit.set_sensitive(active)
self.bat_limit.set_sensitive(active) self.bat_limit.set_sensitive(active)
self.chg_limit_override.set_sensitive(active)
self.chg_limit_enable.connect( self.chg_limit_enable.connect(
"notify::active", lambda switch, _: handle_chg_limit_enable(switch) "notify::active", lambda switch, _: handle_chg_limit_enable(switch)
@@ -97,12 +93,6 @@ class BatteryLimiterPage(Gtk.Box):
), ),
) )
self.chg_limit_override_btn.connect(
"clicked",
lambda _: ec_commands.framework_laptop.override_charge_limit(
app.cros_ec
),
)
except ec_exceptions.ECError as e: except ec_exceptions.ECError as e:
if e.ec_status == ec_exceptions.EcStatus.EC_RES_INVALID_COMMAND: if e.ec_status == ec_exceptions.EcStatus.EC_RES_INVALID_COMMAND:
app.no_support.append(ec_commands.framework_laptop.EC_CMD_CHARGE_LIMIT_CONTROL) app.no_support.append(ec_commands.framework_laptop.EC_CMD_CHARGE_LIMIT_CONTROL)

View File

@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.96.1 --> <!-- Created with Cambalache 0.96.3 -->
<interface> <interface>
<!-- interface-name battery-limiter.ui --> <!-- interface-name battery-limiter.ui -->
<!-- interface-description The Battery page for YAFI --> <!-- interface-description The Battery page for YAFI -->
@@ -79,25 +79,6 @@
</child> </child>
</object> </object>
</child> </child>
<child>
<object class="AdwActionRow" id="chg_limit_override">
<property name="sensitive">False</property>
<property name="subtitle">Disables the limiter for one charge</property>
<property name="title">Override Charge Limiter</property>
<child>
<object class="GtkBox">
<property name="halign">end</property>
<property name="homogeneous">True</property>
<property name="valign">center</property>
<child>
<object class="GtkButton" id="chg_limit_override_btn">
<property name="label">Override</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child> <child>
<object class="AdwPreferencesGroup" id="bat_ext_group"> <object class="AdwPreferencesGroup" id="bat_ext_group">
<property name="description">Preserve the battery lifespan by gradually lowering battery charge voltage automatically if the system is connected to AC for more than the set day limit.</property> <property name="description">Preserve the battery lifespan by gradually lowering battery charge voltage automatically if the system is connected to AC for more than the set day limit.</property>

View File

@@ -5,7 +5,7 @@
<ui template-class="YafiWindow" filename="yafi.ui" sha256="9d1b2f030e4a816eb0b1aa53ae1d80c5b50a2f4646e32c7a64803eb6f6ed3947"/> <ui template-class="YafiWindow" filename="yafi.ui" sha256="9d1b2f030e4a816eb0b1aa53ae1d80c5b50a2f4646e32c7a64803eb6f6ed3947"/>
<ui template-class="ThermalsPage" filename="thermals.ui" sha256="89f5b68da04abad587d8b949d18357cd956313680e663b10e5d42697f9bfbf6e"/> <ui template-class="ThermalsPage" filename="thermals.ui" sha256="89f5b68da04abad587d8b949d18357cd956313680e663b10e5d42697f9bfbf6e"/>
<ui template-class="LedsPage" filename="leds.ui" sha256="abc3ee759974a5c92feb48cc258dbe7271d0402facf71fd5e779f2bb1a277e16"/> <ui template-class="LedsPage" filename="leds.ui" sha256="abc3ee759974a5c92feb48cc258dbe7271d0402facf71fd5e779f2bb1a277e16"/>
<ui template-class="BatteryLimiterPage" filename="battery-limiter.ui" sha256="b5d41b19cb1fb7ca5b4bcfae43244e54111f5e8d8c51d95448d6a92b5185d2c4"/> <ui template-class="BatteryLimiterPage" filename="battery-limiter.ui" sha256="3a50b0dea08b9acbaa389d7d7a38bd94970fdc79207ef10638f722f52d9425cd"/>
<ui template-class="HardwarePage" filename="hardware.ui" sha256="37ea282198d9f60435f80e4adf8256cd2249e590dcad4b63af634d828673f1bf"/> <ui template-class="HardwarePage" filename="hardware.ui" sha256="37ea282198d9f60435f80e4adf8256cd2249e590dcad4b63af634d828673f1bf"/>
<ui template-class="BatteryPage" filename="battery.ui" sha256="d495280cb543a26cdee1c2939e5af980d8d3878c326e360eeab4f05195cdbdc9"/> <ui template-class="BatteryPage" filename="battery.ui" sha256="d495280cb543a26cdee1c2939e5af980d8d3878c326e360eeab4f05195cdbdc9"/>
</cambalache-project> </cambalache-project>

Binary file not shown.