diff --git a/pluginInfo.json b/pluginInfo.json
index cf2a4f6..f770563 100755
--- a/pluginInfo.json
+++ b/pluginInfo.json
@@ -1,8 +1,8 @@
{
"repoName": "fpp-vastfmt",
- "name": "Vast V-FMT212R/Si4713",
+ "name": "Si4713/Vast V-FMT212R",
"author": "Daniel Kulp",
- "description": "Basic RDS/Audio support for the Vast Electronics V-FMT212R USB FM Transmitter and Si4713 I2C modules",
+ "description": "RDS/Audio support for the Vast Electronics V-FMT212R USB FM Transmitter and Si4713 I2C modules",
"homeURL": "https://github.com/FalconChristmas/fpp-vastfmt",
"srcURL": "https://github.com/FalconChristmas/fpp-vastfmt.git",
"bugURL": "https://github.com/FalconChristmas/fpp-vastfmt/issues",
@@ -30,10 +30,17 @@
},
{
"minFPPVersion": "3.3",
+ "maxFPPVersion": "3.99",
+ "branch": "master",
+ "sha": "8d3589395ae7615148ce7a29311408e1533ea423",
+ "allowUpdates": 0
+ },
+ {
+ "minFPPVersion": "4.0",
"maxFPPVersion": "0",
"branch": "master",
"sha": "",
- "allowUpdates": 0
+ "allowUpdates": 1
}
]
}
diff --git a/plugin_setup.php b/plugin_setup.php
index 2c34c8e..3a5705a 100755
--- a/plugin_setup.php
+++ b/plugin_setup.php
@@ -1,30 +1,47 @@
\n";
+ $data = file_get_contents('http://127.0.0.1:32322/gpio');
+ $gpiojson = json_decode($data, true);
+ $gpioPins = Array();
+ foreach($gpiojson as $gpio) {
+ $pn = $gpio['pin'] . ' (GPIO: ' . $gpio['gpio'] . ')';
+ $gpioPins[$pn] = $gpio['gpio'];
+
+ if ($curGpio == $gpio['pin']) {
+ $defaultGPIO = $gpio['gpio'];
+ $pluginSettings["ResetPin"] = $defaultGPIO;
+ WriteSettingToFile("ResetPin", $defaultGPIO, "fpp-vastfmt");
+ }
+ }
+ echo "\n";
?>
@@ -33,9 +50,9 @@ function toggle(id) {
@@ -45,11 +62,11 @@ function toggle(id) {
@@ -58,18 +75,18 @@ function toggle(id) {
-
-
-
-
+
diff --git a/src/FPPVastFM.cpp b/src/FPPVastFM.cpp
index 4f67816..f3d9826 100755
--- a/src/FPPVastFM.cpp
+++ b/src/FPPVastFM.cpp
@@ -37,6 +37,7 @@ static void padTo(std::string &s, int l) {
class FPPVastFMPlugin : public FPPPlugin {
public:
bool enabled = true;
+ bool rdsEnabled = false;
FPPVastFMPlugin() : FPPPlugin("fpp-vastfmt") {
setDefaultSettings();
if (settings["Start"] == "FPPDStart") {
@@ -109,7 +110,8 @@ class FPPVastFMPlugin : public FPPPlugin {
std::string ts = si4713->getTuneStatus();
LogInfo(VB_PLUGIN, "VAST-FMT: %s\n", ts.c_str());
- if (settings["EnableRDS"] == "True") {
+ rdsEnabled = settings["EnableRDS"] == "True";
+ if (rdsEnabled) {
initRDS();
}
}
@@ -199,7 +201,7 @@ class FPPVastFMPlugin : public FPPPlugin {
virtual void playlistCallback(const Json::Value &playlist, const std::string &action, const std::string §ion, int item) {
- if (action == "stop") {
+ if (action == "stop" && rdsEnabled) {
formatAndSendText(settings["StationText"], "", "", true);
formatAndSendText(settings["RDSTextText"], "", "", false);
}
@@ -211,6 +213,9 @@ class FPPVastFMPlugin : public FPPPlugin {
}
virtual void mediaCallback(const Json::Value &playlist, const MediaDetails &mediaDetails) {
+ if (!rdsEnabled) {
+ return;
+ }
std::string title = mediaDetails.title;
std::string artist = mediaDetails.artist;
std::string album = mediaDetails.album;
@@ -252,6 +257,7 @@ class FPPVastFMPlugin : public FPPPlugin {
} else if (!emptyAllowed && settings[s] == "") {
settings[s] = v;
}
+ LogDebug(VB_PLUGIN, "Setting \"%s\": \"%s\"\n", s.c_str(), settings[s].c_str());
}
Si4713 *si4713 = nullptr;