Files
firmware/src/modules/Plugins.cpp

62 lines
1.9 KiB
C++
Raw Normal View History

#include "configuration.h"
2022-01-13 14:06:10 +01:00
#include "input/InputBroker.h"
#include "input/RotaryEncoderInterruptImpl1.h"
2022-02-26 23:56:26 -08:00
#include "modules/AdminPlugin.h"
#include "modules/CannedMessagePlugin.h"
#include "modules/ExternalNotificationPlugin.h"
#include "modules/NodeInfoPlugin.h"
#include "modules/PositionPlugin.h"
#include "modules/RemoteHardwarePlugin.h"
#include "modules/ReplyPlugin.h"
#include "modules/RoutingPlugin.h"
#include "modules/TextMessagePlugin.h"
#ifndef PORTDUINO
2022-02-26 23:56:26 -08:00
#include "modules/Telemetry/Telemetry.h"
#endif
2021-02-16 18:07:02 -08:00
#ifndef NO_ESP32
2022-02-26 23:56:26 -08:00
#include "modules/esp32/RangeTestPlugin.h"
#include "modules/esp32/SerialPlugin.h"
#include "modules/esp32/StoreForwardPlugin.h"
2021-02-16 18:07:02 -08:00
#endif
/**
* Create plugin instances here. If you are adding a new plugin, you must 'new' it here (or somewhere else)
*/
void setupPlugins()
{
2022-01-11 16:02:55 +01:00
inputBroker = new InputBroker();
2021-02-21 14:03:44 +08:00
adminPlugin = new AdminPlugin();
nodeInfoPlugin = new NodeInfoPlugin();
positionPlugin = new PositionPlugin();
textMessagePlugin = new TextMessagePlugin();
2022-02-24 20:05:27 -08:00
// Note: if the rest of meshtastic doesn't need to explicitly use your plugin, you do not need to assign the instance
// to a global variable.
new RemoteHardwarePlugin();
new ReplyPlugin();
2022-02-19 23:43:32 -08:00
rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1();
2022-01-12 09:26:42 +01:00
rotaryEncoderInterruptImpl1->init();
2022-01-11 16:02:55 +01:00
cannedMessagePlugin = new CannedMessagePlugin();
#ifndef PORTDUINO
new TelemetryPlugin();
#endif
#ifndef NO_ESP32
// Only run on an esp32 based device.
/*
Maintained by MC Hamster (Jm Casler) jm@casler.org
*/
new SerialPlugin();
new ExternalNotificationPlugin();
2021-02-16 18:07:02 -08:00
// rangeTestPlugin = new RangeTestPlugin();
storeForwardPlugin = new StoreForwardPlugin();
new RangeTestPlugin();
2021-02-16 18:07:02 -08:00
// new StoreForwardPlugin();
#endif
2021-03-05 11:44:45 +08:00
// NOTE! This plugin must be added LAST because it likes to check for replies from other plugins and avoid sending extra acks
routingPlugin = new RoutingPlugin();
}