#include "comm.nqh"

/* Just try to read a packet and send an ACK (or whatever) */
task main () {
  /* so we know what happens */
  SetUserDisplay(error, 0);
  
  until (false) {
    ReadPacket();

    if (error == 0) {
      /* we got a valid packet! */
      if (packet_buffer[0] == PING)
	SendMessagePacket(ACK);
      else
	SendMessagePacket(NCK);
    }
  }
}