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 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: 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.