Skip to content

Commit

Permalink
scons: serialize_programmer(): clean code, add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Mar 4, 2024
1 parent 2eb1eeb commit 7908fb7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apio/managers/scons.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def serialize_programmer(

# -- Get the programmer type
# -- Ex. type: "tinyprog"
# -- Ex. type: "icesprog"
# -- Ex. type: "iceprog"
prog_info = board_data["programmer"]
prog_type = prog_info["type"]

Expand All @@ -474,7 +474,11 @@ def serialize_programmer(
# -- * pip package
content = self.resources.programmers[prog_type]

programmer = content.get("command")
# -- Get the command (without arguments) to execute
# -- for programming the current board
# -- Ex. "tinyprog"
# -- Ex. "iceprog"
programmer = content["command"]

# dfu-util needs extra args first
if programmer.startswith("dfu-util"):
Expand Down

0 comments on commit 7908fb7

Please sign in to comment.