adf codes for testing downlink using beagle
Fork of adf_check_for_beagle_testing by
Diff: main.cpp
- Revision:
- 7:20e25489f982
- Parent:
- 6:ff50e2e02680
- Child:
- 8:34a2835500e7
diff -r ff50e2e02680 -r 20e25489f982 main.cpp --- a/main.cpp Tue Dec 29 06:18:03 2015 +0000 +++ b/main.cpp Tue Dec 29 10:12:05 2015 +0000 @@ -1,5 +1,5 @@ //Working for ISR = 2 28/12/2015 7:02 PM -//working for ISR = 10 29/12/2015 10:43 AM + @@ -37,7 +37,6 @@ bool sent_tmfrom_SDcard; bool loop_on; bool ADF_off; -bool done =false; bool buffer_state; uint8_t signal = 0x00; unsigned char bbram_buffer[66]={0x19,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x00,0xF4,0xC2,0x10,0xC0,0x00,0x30,0x31,0x07,0x00,0x01,0x00,0x7F,0x00,0x0B,0x37,0x00,0x00,0x40,0x0C,0x00,0x05,0x00,0x00,0x18,0x12,0x34,0x56,0x10,0x10,0xC4,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00}; @@ -285,11 +284,8 @@ transmitdata(); } } - else if (ADF_off &&(!done)){ - done=true; - } - else if(done){ -// wait_ms(0); + else{ + wait_ms(20); ticker.detach(); gCS_ADF=0; spi.write(0xB1); @@ -297,11 +293,7 @@ gPC.puts("transmission done\r\n"); cout<<counter<<endl; loop_on=false; - - } - else{ - cout<<"error in check"<<endl; - } + } } }