I'm trying to define a block of memory that contains 5 pairs of VFO scan limits (low-high ranges). The storage is the same for the regular 750 channel memories, even though the freq field is the only significant one for the VFO scan limits..
struct channel { bbcd freq[4]; bbcd offset[4]; u8 unknownA:4, tune_step:4; ... u8 unknown24:4, scramble:4; char name[7]; ul16 custtone; }; ... #seekto 0x2000; struct channel memory[750]; ... #seekto 0x7DC0; struct { channel low_limit; channel high_limit; } vfo_scan_limits[5];
This gets me:
File "c:\proj\proj_chirp\chirp\chirp\bitwise_grammar.py", line 134, in parse return pypeg_parse(_language, FakeFileInput()) File "c:\proj\proj_chirp\chirp\chirp\pyPEG.py", line 388, in parse raise SyntaxError("syntax error in " + u(file) + ":" + File "<string>", line None SyntaxError: syntax error in input:116: channel low_limit;
Is this just a bug in the grammar? Or, is my definition of five pairs too complicated for bitwise?
Should I stick to an array of 10 scalars, and do the odd/even math in my code? Easy enough, but not nearly as elegant.
#seekto 0x7DC0; struct channel vfo_scan_limits[10];
Thanks