Project

General

Profile

Revision 294

Got the data response to work, however analog8 reads are failing to get good data.

View differences:

robot_test.c
1 1
#include <dragonfly_lib.h>
2 2
#include <wireless.h>
3
#include <wl_token_ring.h>
4
#define TEST_CODE 12
3 5

  
4 6
void  handle_receive(char type, int source, unsigned char *packet, int length);
5 7

  
8

  
6 9
int main(void){
7
  PacketGroupHandler pgh;
8
  pgh.groupCode=12;
10
  
11
  wl_init();
12
 PacketGroupHandler pgh;
13

  
14
  pgh.groupCode=TEST_CODE;
9 15
  pgh.timeout_handler=NULL;
10 16
  pgh.handle_response=NULL;
11 17
  pgh.handle_receive=handle_receive;
......
13 19

  
14 20
  wl_register_packet_group(&pgh);
15 21
  
22
  wl_token_ring_register(); 
23
  wl_token_ring_join();
24
  
16 25
  while(1){
17 26
    wl_do();
18 27
  }

Also available in: Unified diff