Hello Melanie
I have seen the code you posted. I have a couple of queries and would like to know your opinion on them.
You use a step wise approach of building the command in the buffer by reading characters one by one. Can I use a construct like this and get away with it? If not, what could be the catch?
Code:
' wait for a command terminated by CR
hserin [STR CmdBuf\16\13]
You compare commands with templates in EEPROM. Is there a way to avoid this and compare directly with templates in program space? I plan to have a strcmp function for each template I want checked. So, I might invoke it like this
gosub CheckCmd1
if Result then Command1
gosub CheckCmd2
if Result then Command2
Each CheckCmd function will check the Command Buffer against the template it has.
I am trying to do this
Command1 - TS ddmmyy hhnn <CR> Time Set
Command2 - GL <CR> Get Log
Command3 - CL <CR> Clear Log
I'd like to know what you think of this approach
Thanks
Jerson
Bookmarks