Changeset 580

Show
Ignore:
Timestamp:
05/08/08 16:32:28 (1 week ago)
Author:
agr
Message:

sampl bug fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nano-RK/projects/SAMPL/app_pkt_handlers/ff_basic_sensor_pkt.c

    r576 r580  
    6565 
    6666  val=nrk_set_status(fd,SENSOR_SELECT,AUDIO_P2P); 
    67   val=nrk_read(fd,&tmp,1); 
     67  val=nrk_read(fd,&tmp,2); 
    6868  if(tmp>255) tmp=255; 
    6969  s.sound_level=tmp; 
  • nano-RK/projects/SAMPL/client/main.c

    r563 r580  
    257257 
    258258  while (1) { 
     259    nrk_led_clr (GREEN_LED); 
    259260    // Wait until an RX packet is received 
    260261    val = bmac_wait_until_rx_pkt (); 
     
    265266    p2p_flag=0; 
    266267    // Get the RX packet  
    267     nrk_led_set (GREEN_LED); 
     268    if(admin_debug_flag==1) nrk_led_set (GREEN_LED); 
    268269    local_rx_buf = bmac_rx_pkt_get (&rx_buf_len, &rssi); 
    269270 
     
    314315    } 
    315316    #endif 
    316     nrk_led_clr (GREEN_LED); 
    317317 
    318318// Service Packet  
     
    445445 
    446446  printf ("ff tx task PID=%d\r\n", nrk_get_pid ()); 
    447   admin_debug_flag=1
     447  admin_debug_flag=0
    448448  // Wait until the tx_task starts up bmac 
    449449  // This should be called by all tasks using bmac that 
     
    577577        nrk_kprintf (PSTR ("Send P2P packet...\r\n")); 
    578578#endif 
    579         nrk_led_set (RED_LED); 
     579        if(admin_debug_flag==1) nrk_led_set (RED_LED); 
    580580        check_period.secs = 0; 
    581581        check_period.nano_secs = p2p_pkt.check_rate * NANOS_PER_MS;