This is the code of the loading- and dockingstation of the robot.
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.