Skip to content

The Colour Sample does not recognise DX CQs #6

@aviatorhh

Description

@aviatorhh

If the FT8 CQ is of type CQ DX ... the callsign is not coloured.
Here is a fix for the regex part:

--- a/samples/color_wsjtx_packets.py
+++ b/samples/color_wsjtx_packets.py
@@ -30,7 +30,7 @@ while True:
             reply_beat_packet = pywsjtx.HeartBeatPacket.Builder(the_packet.wsjtx_id,max_schema)
             s.send_packet(addr_port, reply_beat_packet)
         if type(the_packet) == pywsjtx.DecodePacket:
-            m = re.match(r"^CQ\s+(\S+)\s+", the_packet.message)
+            m = re.match(r"^CQ.*?([A-Z0-9]+[0-9][A-Z]+)\s+", the_packet.message)
             if m:
                 print("Callsign {}".format(m.group(1)))
                 callsign = m.group(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions