Add a "Development Mode" for our plugins

1.2-legacy
Jm 2021-03-25 19:24:36 -07:00
rodzic bbaf5946f0
commit 040bb1d1e0
2 zmienionych plików z 16 dodań i 2 usunięć

Wyświetl plik

@ -0,0 +1,10 @@
#pragma once
/*
* To developers:
* Use this to enable / disable features in your plugin that you don't want to risk checking into GitHub.
*
*/
// Enable development more for StoreForwardPlugin
bool StoreForward_Dev = false;

Wyświetl plik

@ -5,6 +5,7 @@
#include "Router.h"
#include "configuration.h"
#include "mesh-pb-constants.h"
#include "plugins/PluginDev.h"
#include <Arduino.h>
#include <map>
@ -232,8 +233,11 @@ StoreForwardPlugin::StoreForwardPlugin()
without having to configure it from the PythonAPI or WebUI.
*/
radioConfig.preferences.store_forward_plugin_enabled = 1;
radioConfig.preferences.is_router = 1;
if (StoreForward_Dev) {
radioConfig.preferences.store_forward_plugin_enabled = 1;
radioConfig.preferences.is_router = 1;
}
if (radioConfig.preferences.store_forward_plugin_enabled) {