Main Page | File List | Globals

THE LEO ROBOT PROJECT

This is the code of the loading- and dockingstation of the robot.

IR-Transmission

do_ir() writes to irrbuf which is a global variable of irdatatype [IRMLENGTH]! irbuf can be modified by do_* for checking of new data (irrbuf[0] != 0 -> Data received). If the received datas match the robot data format they will be written to irrstring, where the first char is the length. This length is incremented every received char, so it's up to you to reset the string.

Each impulse must be startet with start_r_ir();

For sending the irsbuf[] is used, which is a pointer to a string given by ir_send. (no own Memory). This is initialized with ir_send(irdatatype *irtosend). These datas may not be valid robot data format. For sending a string of datas use ir_send_string(u08 *stringtosend). This changes the modus to irstring_s and calles ir_send(val_to_ir(..)) for each char until a \0 is found (the \0 is transmitted also)

The fundamental routines read and write to some special strings(recdata, senddata). While receiving the ir_to_val is executed and if data is found it is appended to recstring. Sending is done via ir_string_send(u08 *se) which reads the *se while sending.


Generated on Wed Feb 2 21:19:12 2005 for Station by doxygen 1.3.6