Skip to content

Commit

Permalink
Finish ESP8266 support, fix WSPR regression
Browse files Browse the repository at this point in the history
  • Loading branch information
NT7S committed Mar 16, 2017
1 parent b356a38 commit 6112dc3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Etherkit JTEncode
version=1.1.2
version=1.1.3
author=Jason Milldrum <[email protected]>
maintainer=Jason Milldrum <[email protected]>
sentence=Generate JT65, JT9, JT4, WSPR, and FSQ symbols on your Arduino.
Expand Down
18 changes: 10 additions & 8 deletions src/JTEncode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
// --------------------------------------------------
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion src/JTEncode.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "Arduino.h"

#include <stdint.h>
//#include <avr/pgmspace.h>

#define JT65_SYMBOL_COUNT 126
#define JT9_SYMBOL_COUNT 85
Expand Down

0 comments on commit 6112dc3

Please sign in to comment.