From 4b80866539305242d6fe96bf385efd30d95da6a7 Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Wed, 27 Mar 2019 15:34:38 -0700 Subject: ubxtool: Fixes SAVE/RESET/CFG-CFG bugs. The masks for SAVE and RESET were not defined as intended by the comments, including having one of the bits in the wrong byte. Two conditionals (only one actually effective) were checking the value of 'type' rather than the 'save_clear' argument, probably due to an incomplete rename. This rendered SAVE inoperative, and due to the implied load, it had the effect of resetting the parameters to their saved values (usually the defaults, due to the broken SAVE). The decode for CFG-CFG had similar bugs related to bit positions. TESTED: Tested on LEA-6S, LEA-M8F, LEA-M8T, and LEA-M8N --- ubxtool | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ubxtool b/ubxtool index b73c74ee..929e033a 100755 --- a/ubxtool +++ b/ubxtool @@ -200,12 +200,12 @@ class ubx(object): s += 'navConf ' if mask & 0x10: s += 'rxmConf ' - if mask & 0x80: + if mask & 0x100: # not on M8030 s += 'senConf ' - if mask & 0x100: - s += 'rinvConf ' if mask & 0x200: + s += 'rinvConf ' + if mask & 0x400: s += 'antConf ' if mask & 0x800: s += 'logConf ' @@ -1807,10 +1807,10 @@ class ubx(object): # Clear: save_clear = 1 # basic configs alays available to change: - # ioPort, msgConf, infMsg, navConf, rxmConf, senConf - cfg1 = 0x9f - # rinvConf, antConf, logConf - cfg2 = 0x03 + # ioPort, msgConf, infMsg, navConf, rxmConf + cfg1 = 0x1f + # senConf, rinvConf, antConf, logConf + cfg2 = 0x0f m_data = bytearray(13) @@ -1827,7 +1827,7 @@ class ubx(object): m_data[3] = 0 # # save - if 0 == type: + if 0 == save_clear: # saving m_data[4] = cfg1 m_data[5] = cfg2 @@ -1839,7 +1839,7 @@ class ubx(object): m_data[7] = 0 # # load - if False and 0 == type: + if False and 0 == save_clear: # saving m_data[8] = 0 m_data[9] = 0 -- cgit v1.2.1