From 648deef9299ce05d0f11278ced2b59fd1302127c Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 7 Apr 2014 01:34:58 +0200 Subject: [PATCH] wtf --- Modem/config.h | 2 +- Modem/main.c | 7 ++++--- Modem/protocol/mp1.c | 2 +- buildrev.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Modem/config.h b/Modem/config.h index c2d238f..f37a75b 100644 --- a/Modem/config.h +++ b/Modem/config.h @@ -11,7 +11,7 @@ #define CONFIG_AFSK_RXTIMEOUT 0 // How long a read operation from the modem // will wait for data before timing out. -#define CONFIG_AFSK_PREAMBLE_LEN 500UL // The length of the packet preamble in milliseconds +#define CONFIG_AFSK_PREAMBLE_LEN 650UL // The length of the packet preamble in milliseconds #define CONFIG_AFSK_TRAILER_LEN 100UL // The length of the packet tail in milliseconds #endif \ No newline at end of file diff --git a/Modem/main.c b/Modem/main.c index f0b5a86..f281e4b 100644 --- a/Modem/main.c +++ b/Modem/main.c @@ -29,7 +29,7 @@ static Serial ser; // Declare a serial interface struct #define TEST_TX false // Whether we should send test packets // periodically, plus what to send: -#define TEST_PACKET "Test MP1 AFSK Packet. This is a test. 1234567890. ABCDEFGHIJKLMNOPQRSTUVWXYZ." +#define TEST_PACKET "Test MP1 AFSK Packet. Test123" static uint8_t serialBuffer[MP1_MAX_FRAME_LENGTH]; // This is a buffer for incoming serial data @@ -47,7 +47,8 @@ static bool sertx = false; // Flag signifying whether it's time to send da // so we can process each packet as they are decoded. // Right now it just prints the packet to the serial port. static void mp1Callback(struct MP1Packet *packet) { - kfile_printf(&ser.fd, "%.*s\r\n", packet->dataLength, packet->data); + //kfile_printf(&ser.fd, "%.*s\r\n", packet->dataLength, packet->data); + kprintf("%.*s\r\n", packet->dataLength, packet->data); } // Simple initialization function. @@ -125,7 +126,7 @@ int main(void) } // Periodically send test data if we should do so - if (TEST_TX && timer_clock() - start > ms_to_ticks(15000L)) { + if (TEST_TX && timer_clock() - start > ms_to_ticks(4000L)) { // Reset the timer counter; start = timer_clock(); // And send a test packet! diff --git a/Modem/protocol/mp1.c b/Modem/protocol/mp1.c index 9ff47c8..97791c6 100644 --- a/Modem/protocol/mp1.c +++ b/Modem/protocol/mp1.c @@ -44,7 +44,7 @@ void mp1Poll(MP1 *mp1) { mp1Decode(mp1); } else { // Checksum was incorrect - //mp1Decode(mp1); + mp1Decode(mp1); kprintf("Incorrect checksum. Found %d, ", mp1->buffer[mp1->packetLength]); kprintf("should be %d\n", mp1->checksum_in); } diff --git a/buildrev.h b/buildrev.h index 038af47..16f61fb 100644 --- a/buildrev.h +++ b/buildrev.h @@ -1,2 +1,2 @@ -#define VERS_BUILD 402 +#define VERS_BUILD 412 #define VERS_HOST "vixen"