semuconsulting / PyGPSClient

Python Graphical GPS Client Application supporting NMEA, UBX, RTCM3, NTRIP & SPARTN Protocols
BSD 3-Clause "New" or "Revised" License
521 stars 104 forks source link

SPARTN GNSS config - setting both key1 (CURRENT) and key2 (NEXT) to same value #44

Closed semudev2 closed 1 year ago

semudev2 commented 1 year ago

Describe the bug

PyGPSClient v1.3.17 on all platforms.

Typo in spartn_gnss_frame.py - setting both key1 (CURRENT) and key2 (NEXT) to same value:

    def _format_rxmspartn(self) -> UBXMessage:
        """
        Format UBX RXM-SPARTN-KEY message.
        """

        version = val2bytes(1, U1)
        numKeys = val2bytes(2, U1)
        key1 = bytes.fromhex(self._spartn_key1.get())
        keylen1 = val2bytes(len(key1), U1)
        wno1, tow1 = date2wnotow(self._get_date(self._spartn_valdate1))
        wno1b = val2bytes(wno1, U2)
        tow1b = val2bytes(tow1, U4)
        key2 = bytes.fromhex(self._spartn_key1.get()) <--- THIS SHOULD BE key2.get()
        keylen2 = val2bytes(len(key2), U1)
       etc...

To Reproduce

Steps to reproduce the behaviour:

  1. Enter different CURRENT and NEXT keys in dialog panel, click upload.
  2. Close and re-open panel - will show same key in both CURRENT and NEXT fields.

Expected Behaviour