Changed decode phase window

This commit is contained in:
Mark Qvist 2014-04-07 13:28:14 +02:00
parent 648deef929
commit 84080060eb
6 changed files with 10 additions and 10 deletions

View File

@ -81,9 +81,9 @@ INLINE uint8_t sinSample(uint16_t i) {
// Phase sync constants
#define PHASE_BITS 8
#define PHASE_INC 1
#define PHASE_INC 1 // FIXME: originally 1
#define PHASE_MAX (SAMPLESPERBIT * PHASE_BITS)
#define PHASE_THRESHOLD (PHASE_MAX / 2)
#define PHASE_THRESHOLD (PHASE_MAX / 2) + (PHASE_MAX / 8) // FIXME: originally /2
// Modulation constants
#define MARK_FREQ 1200

View File

@ -49,7 +49,7 @@
* Baudrate for the debug console.
* $WIZ$ type = "int"; min = 300
*/
#define CONFIG_KDEBUG_BAUDRATE 57600UL
#define CONFIG_KDEBUG_BAUDRATE 115200UL
/**
* Clock source for the UART module. You need to write the code to reprogram the respective clock at the required frequency in your project before calling kdbg_init().

View File

@ -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 650UL // The length of the packet preamble in milliseconds
#define CONFIG_AFSK_PREAMBLE_LEN 1000UL // The length of the packet preamble in milliseconds
#define CONFIG_AFSK_TRAILER_LEN 100UL // The length of the packet tail in milliseconds
#endif

View File

@ -66,7 +66,7 @@ static void init(void)
// Initialize serial comms on UART0,
// which is the hardware serial on arduino
ser_init(&ser, SER_UART0);
ser_setbaudrate(&ser, 57600);
ser_setbaudrate(&ser, 115200);
// Create a modem context
afsk_init(&afsk, ADC_CH);
@ -102,7 +102,7 @@ int main(void)
// and the byte is not a "transmit" (newline) character,
// we should store it for transmission.
if ((serialLen < MP1_MAX_FRAME_LENGTH) && (sbyte != 138)) {
kprintf("%d\n", sbyte);
kprintf("Byte: %d\n", sbyte);
// Put the read byte into the buffer;
serialBuffer[serialLen] = sbyte;
// Increment the read length counter
@ -126,7 +126,7 @@ int main(void)
}
// Periodically send test data if we should do so
if (TEST_TX && timer_clock() - start > ms_to_ticks(4000L)) {
if (TEST_TX && timer_clock() - start > ms_to_ticks(5000L)) {
// Reset the timer counter;
start = timer_clock();
// And send a test packet!

View File

@ -45,8 +45,8 @@ void mp1Poll(MP1 *mp1) {
} else {
// Checksum was incorrect
mp1Decode(mp1);
kprintf("Incorrect checksum. Found %d, ", mp1->buffer[mp1->packetLength]);
kprintf("should be %d\n", mp1->checksum_in);
//kprintf("Incorrect checksum. Found %d, ", mp1->buffer[mp1->packetLength]);
//kprintf("should be %d\n", mp1->checksum_in);
}
}
// If the above is not the case, this must be the

View File

@ -1,2 +1,2 @@
#define VERS_BUILD 412
#define VERS_BUILD 438
#define VERS_HOST "vixen"