mirror of
https://github.com/markqvist/OpenModem.git
synced 2024-12-29 01:16:17 -05:00
wtf
This commit is contained in:
parent
c12cd16bd9
commit
648deef929
@ -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
|
@ -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!
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define VERS_BUILD 402
|
||||
#define VERS_BUILD 412
|
||||
#define VERS_HOST "vixen"
|
||||
|
Loading…
Reference in New Issue
Block a user