Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Different layer defaults when using newCfgValSet instead of setVal #143

Closed
markuckermann opened this issue Oct 29, 2020 · 4 comments · Fixed by #155
Closed

Different layer defaults when using newCfgValSet instead of setVal #143

markuckermann opened this issue Oct 29, 2020 · 4 comments · Fixed by #155
Labels
fixed Issue is fixed

Comments

@markuckermann
Copy link

Subject of the issue

Just a heads up really, I'v been caught out by the defaults for newCfgValset...() being different to setVal(). It's just VAL_LAYER_BBR instead of VAL_LAYER_ALL so the settings don't take effect.

The defaults were recently changed in #134 and are set here:

uint8_t newCfgValset8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 8-bit value
uint8_t newCfgValset16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 16-bit value
uint8_t newCfgValset32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 32-bit value

Is this on purpose? I'd suggest having the same defaults across the board.

Your workbench

  • Teensy 3.6 and SFE GPS-RTK2 but it shouldn't matter.

Steps to reproduce

myGPS.newCfgValset8(CFG_MSGOUT_RTCM_3X_TYPE1005_I2C, 1); 
myGPS.addCfgValset8(CFG_MSGOUT_RTCM_3X_TYPE1097_I2C, 1);
myGPS.sendCfgValset8(CFG_MSGOUT_RTCM_3X_TYPE1230_I2C, 10); 

Expected behavior

Changes saved to RAM + other layers

Actual behavior

Changes saved to BBR only

@PaulZC
Copy link
Collaborator

PaulZC commented Oct 30, 2020

Hi Mark (@markuckermann ),

Thanks for spotting this! I'll change it...
I'll leave this issue open until the fix is in...

Meanwhile, you can work around this by using:
myGPS.newCfgValset8(CFG_MSGOUT_RTCM_3X_TYPE1005_I2C, 1, VAL_LAYER_ALL);
etc.

Best wishes,

Paul

PaulZC added a commit that referenced this issue Oct 30, 2020
@PaulZC
Copy link
Collaborator

PaulZC commented Oct 30, 2020

The fix is in... On the release_candidate branch. I'll leave this open until it gets merged into master.
0ef7394

@markuckermann
Copy link
Author

Just realised it's explained in the example, but not very well.

//setValueSuccess &= myGPS.newCfgValset8(CFG_MSGOUT_RTCM_3X_TYPE1005_I2C, 1, 7); //Set this and the following settings into Flash/RAM/BBR instead of BBR

The comment suggests that you need to change the layer to have it updated in RAM.

So as part of this fix, the example ought to be slightly updated too. @PaulZC

@PaulZC
Copy link
Collaborator

PaulZC commented Oct 30, 2020

OK smartypants! ;-D
Thanks Mark. Corrected here:
5edcbf6#diff-f03994c30c299a3b99dffd9c6a5fd91df9fc47f7833a90e73a4f47f425a060afR71

@PaulZC PaulZC added the fixed Issue is fixed label Nov 30, 2020
@PaulZC PaulZC linked a pull request Dec 1, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed Issue is fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants