Skip to content

Commit 6112dc3

Browse files
committed
Finish ESP8266 support, fix WSPR regression
1 parent b356a38 commit 6112dc3

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please feel free to use the issues feature of GitHub if you run into problems or
66

77
Hardware Requirements and Setup
88
-------------------------------
9-
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.
9+
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.
1010

1111
How To Install
1212
--------------
@@ -232,6 +232,11 @@ Also, a big thank you to Murray Greenman, ZL1BPU for working allowing me to pick
232232

233233
Changelog
234234
---------
235+
* v1.1.3
236+
237+
* Add support for ESP8266
238+
* Fix WSPR regression in last release
239+
235240
* v1.1.2
236241

237242
* Fix buffer bug in _jt_message_prep()_ that caused messages of 11 chars to lock up the processor

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Etherkit JTEncode
2-
version=1.1.2
2+
version=1.1.3
33
author=Jason Milldrum <milldrum@gmail.com>
44
maintainer=Jason Milldrum <milldrum@gmail.com>
55
sentence=Generate JT65, JT9, JT4, WSPR, and FSQ symbols on your Arduino.

src/JTEncode.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ void JTEncode::wspr_encode(const char * call, const char * loc, const uint8_t db
200200
char call_[7];
201201
char loc_[5];
202202
uint8_t dbm_ = dbm;
203-
memcpy(call_, call, 6);
204-
memcpy(loc_, loc, 4);
203+
strcpy(call_, call);
204+
strcpy(loc_, loc);
205205

206206
// Ensure that the message text conforms to standards
207207
// --------------------------------------------------
@@ -742,11 +742,12 @@ void JTEncode::jt9_interleave(uint8_t * s)
742742
// Do the interleave
743743
for(i = 0; i < JT9_BIT_COUNT; i++)
744744
{
745-
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__)
745+
//#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__)
746+
#if defined(__arm__)
747+
d[jt9i[i]] = s[i];
748+
#else
746749
j = pgm_read_byte(&jt9i[i]);
747750
d[j] = s[i];
748-
#else
749-
d[jt9i[i]] = s[i];
750751
#endif
751752
}
752753

@@ -1000,10 +1001,11 @@ uint8_t JTEncode::crc8(const char * text)
10001001
for(i = 0; i < strlen(text); i++)
10011002
{
10021003
ch = text[i];
1003-
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__)
1004-
crc = pgm_read_byte(&(crc8_table[(crc) ^ ch]));
1005-
#else
1004+
//#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega16U4__)
1005+
#if defined(__arm__)
10061006
crc = crc8_table[(crc) ^ ch];
1007+
#else
1008+
crc = pgm_read_byte(&(crc8_table[(crc) ^ ch]));
10071009
#endif
10081010
crc &= 0xFF;
10091011
}

src/JTEncode.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "Arduino.h"
2828

2929
#include <stdint.h>
30-
//#include <avr/pgmspace.h>
3130

3231
#define JT65_SYMBOL_COUNT 126
3332
#define JT9_SYMBOL_COUNT 85

0 commit comments

Comments
 (0)