Owne / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

Xbee test not showing incoming data #253

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I like to test if the Xbee is receiving data correctly. Can you update the Xbee 
test to:

static int8_t
test_xbee(uint8_t argc, const Menu::arg *argv)
{
    print_hit_enter();
    delay(1000);
    Serial.printf_P(PSTR("Begin XBee X-CTU Range and RSSI Test:\n"));
    while(1){
        delay(250);      
        // Timeout set high enough for X-CTU RSSI Calc over XBee @ 115200
                // Default 32bit data from X-CTU Range Test
        Serial3.printf_P(PSTR("0123456789:;<=>?@ABCDEFGHIJKLMNO"));
        Serial.println("Message Sent");

                if(Serial3.available() > 0) //check buffer 
                {
                    delay(3);                   //wait for 32 Bytes at 115200 baud
                    Serial.print("Received: ");         
                    while(Serial3.available() > 0){                 
                    byte received = Serial3.read();         
                Serial.print(received); 
                    }
                    Serial.println(" ");
                }

        if(Serial.available() > 0){
            return (0);
        }
    }
}

Thanks

Original issue reported on code.google.com by whitm...@gmail.com on 9 Dec 2010 at 4:24

GoogleCodeExporter commented 8 years ago

Original comment by amilcar....@gmail.com on 11 Oct 2011 at 9:31

GoogleCodeExporter commented 8 years ago
I don't understand the intention of this suggested code change

Original comment by analogue...@gmail.com on 2 Jan 2012 at 9:16