From 0d54311b8b57fef8ed220f73761eb22dfab656f9 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 3 Jun 2025 15:28:08 +0200 Subject: [PATCH 1/3] scum_programmer/programmer: sort list of ports to avoid inconsistencies --- scum_programmer/programmer/serial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scum_programmer/programmer/serial.py b/scum_programmer/programmer/serial.py index f44b3aa..4194a30 100644 --- a/scum_programmer/programmer/serial.py +++ b/scum_programmer/programmer/serial.py @@ -5,7 +5,7 @@ def get_default_port(): """Return default serial port.""" - ports = [port for port in list_ports.comports()] + ports = sorted([port for port in list_ports.comports()]) if sys.platform != "win32": ports = [port for port in ports if "J-Link" == port.product] if not ports: From b9242588fc0683f459035e2f8c2588b37c62031f Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 3 Jun 2025 15:29:29 +0200 Subject: [PATCH 2/3] scum_programmer/programmer/scum: cleanup send loop --- scum_programmer/programmer/scum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scum_programmer/programmer/scum.py b/scum_programmer/programmer/scum.py index f799d7b..c3c952a 100644 --- a/scum_programmer/programmer/scum.py +++ b/scum_programmer/programmer/scum.py @@ -47,7 +47,7 @@ def _send_command(self, msg: str, command: bytes): """Send a command to the SCuM.""" pos = 0 _command = hdlc_encode(command) - while (pos % USB_CHUNK_SIZE) == 0 and pos < len(_command): + while pos < len(_command): self.serial.write(_command[pos : pos + USB_CHUNK_SIZE]) self.serial.flush() pos += USB_CHUNK_SIZE From 04ad4eabfdffc3cec588a3dc4aed9a2c23dfc975 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 3 Jun 2025 15:37:37 +0200 Subject: [PATCH 3/3] sdk/rftimer: fix typo --- sdk/bsp/rftimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/bsp/rftimer.c b/sdk/bsp/rftimer.c index a4e0d9b..ef15144 100644 --- a/sdk/bsp/rftimer.c +++ b/sdk/bsp/rftimer.c @@ -26,7 +26,7 @@ static rftimer_vars_t rftimer_vars = { 0 }; static bool delay_completed[NUM_INTERRUPTS] = { 0 }; // flag indicating whether the delay has // completed. For use by // delay_milliseoncds_synchronous method -static bool is_repeating[NUM_INTERRUPTS] = { 0 }; // flag indicating whethere each COMPARE +static bool is_repeating[NUM_INTERRUPTS] = { 0 }; // flag indicating whether each COMPARE // will repeat at a fixed rate static unsigned int timer_durations[NUM_INTERRUPTS] = { 0 }; // indicates length each COMPARE // interrupt was set to run for.