From 6829a9df85c97c5261b12bc2ff0316a7249e39f0 Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Fri, 1 Dec 2023 19:54:07 +0100 Subject: [PATCH] ensure callsign in correct format --- modem/command_ping.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modem/command_ping.py b/modem/command_ping.py index 2a4e316f..01edd438 100644 --- a/modem/command_ping.py +++ b/modem/command_ping.py @@ -1,9 +1,13 @@ from command import TxCommand +import api_validations class PingCommand(TxCommand): def set_params_from_api(self, apiParams): self.dxcall = apiParams['dxcall'] + if not api_validations.validate_freedata_callsign(self.dxcall): + self.dxcall = f"{self.dxcall}-0" + return super().set_params_from_api(apiParams) def build_frame(self):