X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fax25_test.c;h=fc3736ccfbce757bb00b676406ef35a08c030e22;hb=e47f203a5648786cd782d921880a77a395570059;hp=2016eadbfa18dea4eb85fc7858de20c45574a44a;hpb=74c7bb68260444eee2831f758b1a9296d6d4ac4e;p=bertos.git diff --git a/bertos/net/ax25_test.c b/bertos/net/ax25_test.c index 2016eadb..fc3736cc 100644 --- a/bertos/net/ax25_test.c +++ b/bertos/net/ax25_test.c @@ -41,12 +41,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 +75,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 +89,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);