diff --git a/README.md b/README.md index 820bb9c..5ecb982 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Please feel free to use the issues feature of GitHub if you run into problems or Hardware Requirements and Setup ------------------------------- -This library has been written for the Arduino platform and has been successfully tested on the Arduino Uno, an Uno clone, and an Arduino Zero clone. Since the library itself does not access the hardware, there is no reason it should not run on any Arduino model of recent vintage as long as it has at least 2 kB of RAM. +This library has been written for the Arduino platform and has been successfully tested on the Arduino Uno, an Uno clone, an Arduino Zero clone, and a NodeMCU. Since the library itself does not access the hardware, there is no reason it should not run on any Arduino model of recent vintage as long as it has at least 2 kB of RAM. How To Install -------------- @@ -232,6 +232,11 @@ Also, a big thank you to Murray Greenman, ZL1BPU for working allowing me to pick Changelog --------- +* v1.1.3 + + * Add support for ESP8266 + * Fix WSPR regression in last release + * v1.1.2 * Fix buffer bug in _jt_message_prep()_ that caused messages of 11 chars to lock up the processor diff --git a/library.properties b/library.properties index b322c67..b9aa4cb 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Etherkit JTEncode -version=1.1.2 +version=1.1.3 author=Jason Milldrum maintainer=Jason Milldrum sentence=Generate JT65, JT9, JT4, WSPR, and FSQ symbols on your Arduino. diff --git a/src/JTEncode.cpp b/src/JTEncode.cpp index cd5c14e..38b709c 100644 --- a/src/JTEncode.cpp +++ b/src/JTEncode.cpp @@ -200,8 +200,8 @@ void JTEncode::wspr_encode(const char * call, const char * loc, const uint8_t db char call_[7]; char loc_[5]; uint8_t dbm_ = dbm; - memcpy(call_, call, 6); - memcpy(loc_, loc, 4); + strcpy(call_, call); + strcpy(loc_, loc); // Ensure that the message text conforms to standards // -------------------------------------------------- @@ -742,11 +742,12 @@ void JTEncode::jt9_interleave(uint8_t * s) // Do the interleave for(i = 0; i < JT9_BIT_COUNT; i++) { - #if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__) + //#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__) + #if defined(__arm__) + d[jt9i[i]] = s[i]; + #else j = pgm_read_byte(&jt9i[i]); d[j] = s[i]; - #else - d[jt9i[i]] = s[i]; #endif } @@ -1000,10 +1001,11 @@ uint8_t JTEncode::crc8(const char * text) for(i = 0; i < strlen(text); i++) { ch = text[i]; - #if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__) - crc = pgm_read_byte(&(crc8_table[(crc) ^ ch])); - #else + //#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__) + #if defined(__arm__) crc = crc8_table[(crc) ^ ch]; + #else + crc = pgm_read_byte(&(crc8_table[(crc) ^ ch])); #endif crc &= 0xFF; } diff --git a/src/JTEncode.h b/src/JTEncode.h index 3fdd3d0..64ea7c6 100644 --- a/src/JTEncode.h +++ b/src/JTEncode.h @@ -27,7 +27,6 @@ #include "Arduino.h" #include -//#include #define JT65_SYMBOL_COUNT 126 #define JT9_SYMBOL_COUNT 85