18 Jan
2013
18 Jan
'13
5:45 p.m.
Hey Jim,
+#seekto 0x0E7E; +struct {
- u8 mrcha;
- u8 mrchb;
+} wmchannel;
Since these channels can only be 0-127, I wonder if we ought to limit them appropriately? It's possible that the baofeng could use that upper bit for something, which would cause your parsing code below to blow up. Something like:
struct { u8 unused1:1, mrcha:7; u8 unused2:1, mrchb:7; } wmchannel;
The 7-bit field there fits perfectly and will avoid you crashing if that upper bit is set. What do you think?
--
Dan Smith
www.danplanet.com
KK7DS