firmware/src/modules/Modules.cpp

62 lines
1.9 KiB
C++
Raw Normal View History

#include "configuration.h"
2022-01-13 13:06:10 +00:00
#include "input/InputBroker.h"
#include "input/RotaryEncoderInterruptImpl1.h"
#include "modules/AdminModule.h"
#include "modules/CannedMessageModule.h"
#include "modules/ExternalNotificationModule.h"
#include "modules/NodeInfoModule.h"
#include "modules/PositionModule.h"
#include "modules/RemoteHardwareModule.h"
#include "modules/ReplyModule.h"
#include "modules/RoutingModule.h"
#include "modules/TextMessageModule.h"
#ifndef PORTDUINO
2022-02-27 07:56:26 +00:00
#include "modules/Telemetry/Telemetry.h"
#endif
2021-02-17 02:07:02 +00:00
#ifndef NO_ESP32
2022-02-27 07:56:26 +00:00
#include "modules/esp32/RangeTestPlugin.h"
#include "modules/esp32/SerialPlugin.h"
#include "modules/esp32/StoreForwardPlugin.h"
2021-02-17 02:07:02 +00:00
#endif
/**
* Create module instances here. If you are adding a new module, you must 'new' it here (or somewhere else)
*/
void setupPlugins()
{
2022-01-11 15:02:55 +00:00
inputBroker = new InputBroker();
2021-02-21 06:03:44 +00:00
adminPlugin = new AdminPlugin();
nodeInfoPlugin = new NodeInfoPlugin();
positionPlugin = new PositionPlugin();
textMessagePlugin = new TextMessagePlugin();
2022-02-25 04:05:27 +00:00
// Note: if the rest of meshtastic doesn't need to explicitly use your module, you do not need to assign the instance
// to a global variable.
new RemoteHardwarePlugin();
new ReplyPlugin();
2022-02-20 07:43:32 +00:00
rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1();
2022-01-12 08:26:42 +00:00
rotaryEncoderInterruptImpl1->init();
2022-01-11 15:02:55 +00: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-17 02:07:02 +00:00
// rangeTestPlugin = new RangeTestPlugin();
storeForwardPlugin = new StoreForwardPlugin();
new RangeTestPlugin();
2021-02-17 02:07:02 +00:00
// new StoreForwardPlugin();
#endif
2021-03-05 03:44:45 +00:00
// NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra acks
2021-03-05 03:44:45 +00:00
routingPlugin = new RoutingPlugin();
}