5 Commits

Author SHA1 Message Date
morgan
56161805a4 update library properties 2018-11-17 11:47:04 -08:00
morgan
07fbb1af2f fix signedness for char 2018-11-07 16:40:44 -08:00
Morgan Redfield
ba97bd4702 Update library.properties 2017-02-03 15:17:49 -08:00
morgan
5fc9e7abbd Merge branch 'master' of https://github.com/EnhancedRadioDevices/HamShield_KISS 2017-02-03 15:15:46 -08:00
Morgan Redfield
0689f95f74 added check for tx before parsing serial 2017-02-03 11:35:06 -08:00
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
name=HamShield_KISS
version=1.0.3
version=1.0.5
author=Morgan Redfield <morgan@enhancedradio.com>, Casey Halverson <casey@enhancedradio.com>
maintainer=Morgan Redfield <morgan@enhancedradio.com>
sentence=A library for use with HamShield by Enhanced Radio Devices.

View File

@@ -2,6 +2,7 @@
#include "packet.h"
#include "KISS.h"
//AFSK::Packet kissPacket;
bool inFrame = false;
uint8_t kissBuffer[PACKET_MAX_LEN];
@@ -23,7 +24,7 @@ void KISS::loop() {
}
}
// Check if we have incoming data to turn into a packet
while(io->available()) {
while(currentlySending == false && io->available()) {
uint8_t c = (uint8_t)io->read();
if(c == KISS_FEND) {
if(inFrame && kissLen > 0) {
@@ -76,7 +77,7 @@ void KISS::writePacket(AFSK::Packet *p) {
io->write(KISS_FEND);
io->write((uint8_t)0); // Host to TNC port identifier
for(i = 0; i < p->len-2; i++) {
char c = p->getByte(i);
unsigned char c = p->getByte(i);
if(c == KISS_FEND || c == KISS_FESC) {
io->write(KISS_FESC);
io->write((c==KISS_FEND?KISS_TFEND:KISS_TFESC));