Skip to content

Commit 8453f41

Browse files
committed
Remove broken charge limit override
1 parent a0ba66a commit 8453f41

4 files changed

Lines changed: 2 additions & 31 deletions

File tree

yafi/battery_limiter.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ class BatteryLimiterPage(Gtk.Box):
3434
bat_limit = Gtk.Template.Child()
3535
bat_limit_label = Gtk.Template.Child()
3636
bat_limit_scale = Gtk.Template.Child()
37-
chg_limit_override = Gtk.Template.Child()
38-
chg_limit_override_btn = Gtk.Template.Child()
3937

4038
bat_ext_group = Gtk.Template.Child()
4139
bat_ext_enable = Gtk.Template.Child()
@@ -61,7 +59,6 @@ def setup(self, app):
6159
self.bat_limit_label.set_label(f"{ec_limit[1]}%")
6260
self.chg_limit.set_sensitive(True)
6361
self.bat_limit.set_sensitive(True)
64-
self.chg_limit_override.set_sensitive(True)
6562

6663
def handle_chg_limit_change(min, max):
6764
ec_commands.framework_laptop.set_charge_limit(
@@ -79,7 +76,6 @@ def handle_chg_limit_enable(switch):
7976

8077
self.chg_limit.set_sensitive(active)
8178
self.bat_limit.set_sensitive(active)
82-
self.chg_limit_override.set_sensitive(active)
8379

8480
self.chg_limit_enable.connect(
8581
"notify::active", lambda switch, _: handle_chg_limit_enable(switch)
@@ -97,12 +93,6 @@ def handle_chg_limit_enable(switch):
9793
),
9894
)
9995

100-
self.chg_limit_override_btn.connect(
101-
"clicked",
102-
lambda _: ec_commands.framework_laptop.override_charge_limit(
103-
app.cros_ec
104-
),
105-
)
10696
except ec_exceptions.ECError as e:
10797
if e.ec_status == ec_exceptions.EcStatus.EC_RES_INVALID_COMMAND:
10898
app.no_support.append(ec_commands.framework_laptop.EC_CMD_CHARGE_LIMIT_CONTROL)

yafi/ui/battery-limiter.ui

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='UTF-8'?>
2-
<!-- Created with Cambalache 0.96.1 -->
2+
<!-- Created with Cambalache 0.96.3 -->
33
<interface>
44
<!-- interface-name battery-limiter.ui -->
55
<!-- interface-description The Battery page for YAFI -->
@@ -79,25 +79,6 @@
7979
</child>
8080
</object>
8181
</child>
82-
<child>
83-
<object class="AdwActionRow" id="chg_limit_override">
84-
<property name="sensitive">False</property>
85-
<property name="subtitle">Disables the limiter for one charge</property>
86-
<property name="title">Override Charge Limiter</property>
87-
<child>
88-
<object class="GtkBox">
89-
<property name="halign">end</property>
90-
<property name="homogeneous">True</property>
91-
<property name="valign">center</property>
92-
<child>
93-
<object class="GtkButton" id="chg_limit_override_btn">
94-
<property name="label">Override</property>
95-
</object>
96-
</child>
97-
</object>
98-
</child>
99-
</object>
100-
</child>
10182
<child>
10283
<object class="AdwPreferencesGroup" id="bat_ext_group">
10384
<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>

yafi/ui/yafi.cmb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<ui template-class="YafiWindow" filename="yafi.ui" sha256="9d1b2f030e4a816eb0b1aa53ae1d80c5b50a2f4646e32c7a64803eb6f6ed3947"/>
66
<ui template-class="ThermalsPage" filename="thermals.ui" sha256="89f5b68da04abad587d8b949d18357cd956313680e663b10e5d42697f9bfbf6e"/>
77
<ui template-class="LedsPage" filename="leds.ui" sha256="abc3ee759974a5c92feb48cc258dbe7271d0402facf71fd5e779f2bb1a277e16"/>
8-
<ui template-class="BatteryLimiterPage" filename="battery-limiter.ui" sha256="b5d41b19cb1fb7ca5b4bcfae43244e54111f5e8d8c51d95448d6a92b5185d2c4"/>
8+
<ui template-class="BatteryLimiterPage" filename="battery-limiter.ui" sha256="3a50b0dea08b9acbaa389d7d7a38bd94970fdc79207ef10638f722f52d9425cd"/>
99
<ui template-class="HardwarePage" filename="hardware.ui" sha256="37ea282198d9f60435f80e4adf8256cd2249e590dcad4b63af634d828673f1bf"/>
1010
<ui template-class="BatteryPage" filename="battery.ui" sha256="d495280cb543a26cdee1c2939e5af980d8d3878c326e360eeab4f05195cdbdc9"/>
1111
</cambalache-project>

yafi/yafi.gresource

950 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)