Skip to content

Commit

Permalink
TypeError: Button.__init__() missing 1 required positional argument: …
Browse files Browse the repository at this point in the history
…'pin' (#461)

* Bug fixed: missing arguments. (#460)

* Bug fixed: too many digits. (#460)
  • Loading branch information
ATATC authored Dec 14, 2024
1 parent dd90367 commit 670adbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion leads_vec/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def do(self) -> None:
set_debug_window(uim, var_debug, True)
var_info.set(f"VeC {__version__.upper()}\n\n"
f"{_datetime.now().strftime("%Y-%m-%d %H:%M:%S")}\n"
f"{format_duration(duration := _time() - w.runtime_data().start_time)} {cpu_temp} °C\n"
f"{format_duration(duration := _time() - w.runtime_data().start_time)} {cpu_temp:.1f} °C\n"
f"{(m := ctx.data().mileage):.1f} KM - {m * 3600 / duration:.1f} KM / H\n\n"
f"{cfg.refresh_rate} - {w.frame_rate():.2f} FPS - {w.net_delay() * 1000:.1f} MS\n"
f"{(["NOT FOUND"] + my_ip_addresses())[-1]}:{w.runtime_data().comm.port()}")
Expand Down
4 changes: 2 additions & 2 deletions leads_vec/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def write(self, payload: bool) -> None:
) if payload else LEDGroupCommand(LEDCommand.OFF, Entire()))


@device("lib", MAIN_CONTROLLER)
@device("lib", MAIN_CONTROLLER, (16,))
class LeftIndicatorButton(Button, ButtonCallback):
@override
def on_pressed(self) -> None:
Expand All @@ -232,7 +232,7 @@ def initialize(self, *parent_tags: str) -> None:
self.write(self)


@device("rib", MAIN_CONTROLLER)
@device("rib", MAIN_CONTROLLER, (20,))
class RightIndicatorButton(Button, ButtonCallback):
@override
def on_pressed(self) -> None:
Expand Down

0 comments on commit 670adbc

Please sign in to comment.