Merge pull request #14 from slepp/rel-jul13

Minor fixups to KISS, now append FCS. Remove 19200 refclk for now.
This commit is contained in:
Nigel VH 2015-07-13 21:34:14 -07:00
commit 8ab7f97cbd
2 changed files with 3 additions and 5 deletions

View File

@ -23,7 +23,7 @@ void KISS::loop() {
}
}
// Check if we have incoming data to turn into a packet
if(io->available()) {
while(io->available()) {
uint8_t c = (uint8_t)io->read();
if(c == KISS_FEND) {
if(inFrame && kissLen > 0) {
@ -31,7 +31,7 @@ void KISS::loop() {
AFSK::Packet *packet = AFSK::PacketBuffer::makePacket(PACKET_MAX_LEN);
packet->start();
for(i = 0; i < kissLen; i++) {
packet->append(kissBuffer[i]);
packet->appendFCS(kissBuffer[i]);
}
packet->finish();
radio->afsk.encoder.putPacket(packet);

View File

@ -1,5 +1,3 @@
#define DDS_REFCLK_DEFAULT 19200
#include <HamShield.h>
#include <Wire.h>
#include <KISS.h>
@ -21,7 +19,7 @@ void setup() {
radio.setFrequency(145010);
I2Cdev::writeWord(A1846S_DEV_ADDR_SENLOW, 0x30, 0x06);
I2Cdev::writeWord(A1846S_DEV_ADDR_SENLOW, 0x30, 0x26);
I2Cdev::writeWord(A1846S_DEV_ADDR_SENLOW, 0x44, 0b0000011111111111);
I2Cdev::writeWord(A1846S_DEV_ADDR_SENLOW, 0x44, 0x05FF);
dds.start();
radio.afsk.start(&dds);