2021-12-07 23:56:11 +01:00
|
|
|
#include "radio_module.h"
|
2020-08-11 18:33:42 +02:00
|
|
|
|
2021-12-19 22:11:44 +01:00
|
|
|
SDRPP_MOD_INFO{
|
2020-12-08 04:36:37 +01:00
|
|
|
/* Name: */ "radio",
|
2021-12-07 23:56:11 +01:00
|
|
|
/* Description: */ "Analog radio decoder",
|
2020-12-08 04:36:37 +01:00
|
|
|
/* Author: */ "Ryzerth",
|
2021-12-07 23:56:11 +01:00
|
|
|
/* Version: */ 2, 0, 0,
|
2020-12-08 04:36:37 +01:00
|
|
|
/* Max instances */ -1
|
2020-10-01 01:21:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
MOD_EXPORT void _INIT_() {
|
2020-12-09 15:16:38 +01:00
|
|
|
json def = json({});
|
2022-02-24 20:49:53 +01:00
|
|
|
config.setPath(core::args["root"].s() + "/radio_config.json");
|
2020-12-09 15:16:38 +01:00
|
|
|
config.load(def);
|
|
|
|
config.enableAutoSave();
|
2020-08-12 16:43:44 +02:00
|
|
|
}
|
|
|
|
|
2020-12-08 04:36:37 +01:00
|
|
|
MOD_EXPORT ModuleManager::Instance* _CREATE_INSTANCE_(std::string name) {
|
2020-10-01 01:21:15 +02:00
|
|
|
return new RadioModule(name);
|
2020-08-11 18:33:42 +02:00
|
|
|
}
|
|
|
|
|
2020-10-01 01:21:15 +02:00
|
|
|
MOD_EXPORT void _DELETE_INSTANCE_(void* instance) {
|
|
|
|
delete (RadioModule*)instance;
|
2020-08-11 18:33:42 +02:00
|
|
|
}
|
|
|
|
|
2020-12-08 04:36:37 +01:00
|
|
|
MOD_EXPORT void _END_() {
|
2020-12-09 15:16:38 +01:00
|
|
|
config.disableAutoSave();
|
|
|
|
config.save();
|
2020-08-11 18:33:42 +02:00
|
|
|
}
|