X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fax25_test.c;h=f801c2f2488c7b84cf5d69a73122fea758825b00;hb=56f2c002c50338f23f1b969ba51a43b0eb24f3da;hp=2016eadbfa18dea4eb85fc7858de20c45574a44a;hpb=63a35af8aab90ed049447a2837666a52f13b9598;p=bertos.git diff --git a/bertos/net/ax25_test.c b/bertos/net/ax25_test.c index 2016eadb..f801c2f2 100644 --- a/bertos/net/ax25_test.c +++ b/bertos/net/ax25_test.c @@ -32,7 +32,6 @@ * * \brief AX25 test. * - * \version $Id$ * \author Francesco Sacchi */ @@ -41,12 +40,14 @@ #include #include +#include #include #include //strncmp static AX25Ctx ax25; static KFileMem mem; +static KFileDebug dbg; #define APRS_MSG \ 0x3D, 0x34, 0x36, 0x30, 0x33, 0x2E, 0x36, 0x33, \ @@ -73,8 +74,9 @@ uint8_t aprs_packet_check[256]; static void msg_callback(AX25Msg *msg) { - ASSERT(strncmp(msg->dst.call, "APRS ", 6) == 0); - ASSERT(strncmp(msg->src.call, "S57LN ", 6) == 0); + ax25_print(&dbg.fd, msg); + ASSERT(strncmp(msg->dst.call, "APRS\x0\x0", 6) == 0); + ASSERT(strncmp(msg->src.call, "S57LN\x0", 6) == 0); ASSERT(msg->src.ssid == 0); ASSERT(msg->dst.ssid == 0); ASSERT(msg->ctrl == AX25_CTRL_UI); @@ -86,6 +88,7 @@ static void msg_callback(AX25Msg *msg) int ax25_testSetup(void) { kdbg_init(); + kfiledebug_init(&dbg); kfilemem_init(&mem, aprs_packet, sizeof(aprs_packet)); kfilemem_init(&mem1, aprs_packet_check, sizeof(aprs_packet_check)); ax25_init(&ax25, &mem.fd, msg_callback);