Skip to content

Commit

Permalink
Maintenance Release V1.1.1 (June-30-2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomastech committed Jun 30, 2022
1 parent da6818f commit 7dea97d
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 35 deletions.
Binary file removed bin/pixelradio_bin_v1_1_0.zip
Binary file not shown.
Binary file added bin/pixelradio_bin_v1_1_1.zip
Binary file not shown.
32 changes: 27 additions & 5 deletions docs/User_Manual/Controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,40 @@ For example, to set the `Audio` mode use this URL: \
>NOTE: It may be necessary to use the device's IP address instead of the mDNS name. Example:\
>`http://192.168.1.37:8080.cmd?rtper=30`
## HTTP PERCENT ENCODING
It will be necessary to use HTTP *Percent Encoding* formatting on some characters sent by the Program Service Name (`psn`) and RadioText Message (`rtm`) commands.
For example, in order to see the plus sign (+) character it must be sent as ``%2B``.
For example, in order to display the plus sign (+) character it must be sent as ``%2B``.
Otherwise this character will be a blank space on the RDS receiver's display.

There are other non-alphanumeric characters that need this treatment too.
When necessary, change them to their Percent Encoded value listed in <a href="https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding" target="_blank">this table</a>.
The allowable values are hex based and must be in the range of %20 and %7E.

## HTTP CONTROLLER EXAMPLE

The HTTP Controller can be used with Pixel Animation Sequencers.
We've prepared an example that uses *xLights* software: [Click Here](./xLights.md).
#### -> HELPFUL TIPS
Use ``%3F`` to display a question mark (?).\
Text spaces can be replaced with ``%20`` or a plus (``+``) sign.

### HTTP CLEAR TEXT
Clearing the *RadioText Message* (rtm) or *Program Service Name* (psn) requires the Percent Encoding feature.
Either the %20 or %7f hex values (your choice) can be used to erase the text.
Send only the Percent Encoded value;
Do NOT include any other characters when text clearing is required.\
For example, to erase the RadioText message use URL:
`http://pixelradio.local:8080/cmd?rtm=%20` or `http://pixelradio.local:8080/cmd?rtm=%7f`

## HTTP CONTROLLER EXAMPLES
The HTTP Controller can be used with some popular Pixel Animation Sequencers.
This section provides examples to two different solutions that may be of interest to you.

### XLIGHTS / XSCHEDULE
*xLights* is a pixel animation software program that runs on Windows, OSX, and Linux.
It includes a sequence player that can send HTTP commands to control PixelRadio.
For basic instructions on how to configure *xLights* software to do this: [Click Here](./xLights.md).

### FALCON PLAYER (FPP) PLUGIN
*Falcon Player* is a pixel sequencer that runs on low cost single board computers such as the Raspberry Pi.
It has a software plugin that is compatible with PixelRadio's HTTP controller.\
FPP's PixelRadio plugin can be downloaded from the <a href="https://github.com/FalconChristmas" target="_blank">Falcon Christmas Repository</a>.

&nbsp;&nbsp;&nbsp;

Expand Down
18 changes: 12 additions & 6 deletions docs/User_Manual/LocalTab.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,25 @@ The `PROGRAM SERVICE NAME` (PSN) panel is used to enter your Station ID or Name.
It can be up to eight characters.

What you enter here will appear on the Radio Receiver's PSN field.
Suggestions would be something like "GHOSTS!" for a halloween show.
Suggestions would be something like "GHOSTS!" for a Halloween show.
Or perhaps "SANTA" for your Christmas light show.

>Refrain from changing the PSN name too often.
>Some receivers store the name for future searches and unneccessarily changing it may affect that feature.
>Some receivers store the name for future searches and unnecessarily changing it may affect that feature.
### PI CODE

The `PI CODE` panel is used to enter the Program Identification code for your radio station.
The default 0x6400 setting is typically used.
The `PI CODE` panel is used to enter the numeric Program Identification code for your radio station.
It's a 4-digit hexadecimal number that begins with '0x'.
It is a computed value that represents your station's four letter call sign.
The default 0x6400 setting (station *WFVC*) can be changed.

If you are interested in changing it then be sure to avoid using one that is already found in your broadcast area.
For example, USA installations can consult online information like this one:
A handy online calculator for converting your callsign to a hexadecimal PI Code can be found here:
<a href="https://www.caseymediallc.com/rdsreverse.html" target="_blank">Convert Call Sign to PI Code</a>\
Note: The call sign must be four capitalized letters. The first character of a USA based station should be a *K* or *W*.

When choosing a PI Code be sure to avoid a value that is already found in your broadcast area.\
Tip: USA installations can consult online information like this one:
<a href="https://picodes.nrscstandards.org/fs_pi_codes_allocated.html" target="_blank">NRSC PI Codes</a>

### PTY CODE
Expand Down
4 changes: 3 additions & 1 deletion src/PixelRadio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Project: PixelRadio, an RBDS/RDS FM Transmitter (QN8027 Digital FM IC)
Version: 1.1.0
Creation: Dec-16-2021
Revised: Jun-13-2022
Revised: Jun-30-2022
Project Leader: T. Black (thomastech)
Contributors: thomastech, dkulp
Expand Down Expand Up @@ -35,6 +35,8 @@
Performed misc code cleanup.
Updated Readme documentation, added photos for external WiFi antenna modification.
-> Validation completed on Jun-17-2022, public release approved.
V1.1.1, Jun-30-2022: For backwards compatibility, HTTP url commands "psn" and "rtm" can use %20 by itself to clear text.
Revised Documentation, added info about HTTP Text clearing, creating PI Codes, Falcon Player.
Notes:
1. This "Arduino" project must be compiled with VSCode / Platformio. Do not use the Arduino IDE.
Expand Down
8 changes: 4 additions & 4 deletions src/PixelRadio.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
File: PixelRadio.h
Project: PixelRadio, an RBDS/RDS FM Transmitter (QN8027 Digital FM IC)
Version: 1.1.0
Version: 1.1.1
Creation: Dec-16-2021
Revised: Jun-13-2022
Revised: Jun-30-2022
Revision History: See PixelRadio.cpp
Project Leader: T. Black (thomastech)
Contributors: thomastech
Expand All @@ -25,9 +25,9 @@
// *********************************************************************************************
// VERSION STRING: Must be updated with each public release.
// The version is shown during boot on Serial Log and on the "About" UI web Tab page.
#define VERSION_STR "1.1.0"
#define VERSION_STR "1.1.1"
#define AUTHOR_STR "by Thomas Black"
#define BLD_DATE_STR "Jun-13-2022"
#define BLD_DATE_STR "Jun-30-2022"
#define GITHUB_REPO_STR "<a href=\"https://github.com/thomastech/PixelRadio/\" target=\"_blank\">Click Here for Information</a>"

// *********************************************************************************************
Expand Down
5 changes: 2 additions & 3 deletions src/webGUI.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
File: webGUI.h
Project: PixelRadio, an RBDS/RDS FM Transmitter (QN8027 Digital FM IC)
Version: 1.1.0
Version: 1.1.1
Creation: Dec-16-2021
Revised: Jun-13-2022
Revised: Jun-30-2022
Revision History: See PixelRadio.cpp
Project Leader: T. Black (thomastech)
Contributors: thomastech
Expand Down Expand Up @@ -114,7 +114,6 @@ extern uint16_t rdsEnb2ID;
extern uint16_t rdsEnb3ID;
extern uint16_t rdsPiID;
extern uint16_t rdsPtyID;
extern uint16_t rdsPiMsgID;
extern uint16_t rdsProgNameID;
extern uint16_t rdsSaveID;
extern uint16_t rdsSaveMsgID;
Expand Down
35 changes: 19 additions & 16 deletions src/webServer.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
File: webserver.cpp
Project: PixelRadio, an RBDS/RDS FM Transmitter (QN8027 Digital FM IC)
Version: 1.1.0
Version: 1.1.1
Creation: Dec-16-2021
Revised: Jun-13-2022
Revised: Jun-30-2022
Revision History: See PixelRadio.cpp
Project Leader: T. Black (thomastech)
Contributors: thomastech, dkulp
Expand Down Expand Up @@ -89,10 +89,11 @@ int16_t getCommandArg(String& requestStr, uint8_t maxSize) {
if (argStop < 0) {
argStop = requestStr.length();
}

argStr = requestStr.substring(argStart + 1, argStop - 1);
argStr = urlDecode(argStr); // Convert any URL encoded text to ASCII.
// argStr.replace("%20", " "); // Replace the html space with ASCII text.
argStr.trim();
argStr.replace("%7f", " "); // Replace html encoded control "DEL" with space (Text Clear Cmd).
argStr.replace("%7F", " ");
argStr = urlDecode(argStr); // Convert all remaining html encoded text to ASCII.

if (argStr.length() > maxSize) {
argStr = argStr.substring(0, maxSize);
Expand All @@ -101,7 +102,7 @@ int16_t getCommandArg(String& requestStr, uint8_t maxSize) {
return -1; // Fail, Argument Missing.
}

argStr.trim(); // Trim one more time.
argStr.trim(); // Arg length is OK, now safe to Trim off leading and trailing spaces.
requestStr = argStr;
}
else { // Fail, Improper Argument Provided.
Expand Down Expand Up @@ -753,9 +754,9 @@ String urlDecode(String urlStr)
c = urlStr.charAt(i);

if (c == '%') {
code0 = urlStr.charAt(++i);
code1 = urlStr.charAt(++i);
c = (urlDecodeHex(code0) << 4) | urlDecodeHex(code1);
code0 = urlStr.charAt(++i);
code1 = urlStr.charAt(++i);
c = (urlDecodeHex(code0) << 4) | urlDecodeHex(code1);
encodeStr += c;
}
else if (c == '+') {
Expand All @@ -773,17 +774,19 @@ String urlDecode(String urlStr)
// urlDecodeHex(): convert hex to integer base. This is companion function for urlDecode().
unsigned char urlDecodeHex(char c)
{
if (c >= '0' && c <='9'){
return((unsigned char)c - '0');
if ((c >= '0') && (c <= '9')) {
return (unsigned char)c - '0';
}
if (c >= 'a' && c <='f'){
return((unsigned char)c - 'a' + 10);

if ((c >= 'a') && (c <= 'f')) {
return (unsigned char)c - 'a' + 10;
}
if (c >= 'A' && c <='F'){
return((unsigned char)c - 'A' + 10);

if ((c >= 'A') && (c <= 'F')) {
return (unsigned char)c - 'A' + 10;
}

return(0);
return 0;
}

// ************************************************************************************************
Expand Down

0 comments on commit 7dea97d

Please sign in to comment.