-
(originally raised by Bob in BuyMeACoffee) The output from this doesn't obey the principle of least astonishment for my brain, so maybe I'm missing something about how mask and individual parameters interact? resetMsg = UBXMessage(6, 4, SET, navBbrMask=b'\xffff', resetMode=1)
print(resetMsg)
resetMsg = UBXMessage(6, 4, SET, eph=1, alm=1, health=1, klob=1, pos=1, clkd=1, osc=1, utc=1, rtc=1, aop=1, resetMode=1)
print(resetMsg)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Bob, pyubx2 parses bitfields ('X' type attributes) according to the boolean "CFG-RST": {
"navBbrMask": (
X2,
{
"eph": U1,
"alm": U1,
"health": U1,
"klob": U1,
"pos": U1,
"clkd": U1,
"osc": U1,
"utc": U1,
"rtc": U1,
"reserved2": U6,
"aop": U1,
},
),
"resetMode": U1,
"reserved0": U1,
}, If you want to address the bitfield group as a single attribute, you can set resetMsg = UBXMessage(6, 4, SET, navBbrMask=b'\xff\xff', resetMode=1, parsebitfield=0)
print(resetMsg)
print(resetMsg.serialize())
But I would generally recommend setting the individual bit fields, as this is less ambiguous. Bear in mind that |
Beta Was this translation helpful? Give feedback.
Thanks! Much less astonished now :-)