semuconsulting/PyGPSClient

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

semudev2 opened this issue · 0 comments

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

  • Should save CURRENT and NEXT keys correctly.