2025-08-13 22:42:18 +02:00
|
|
|
#include "aws/instruments/mwr/mwr_calibrator.h"
|
2024-09-16 01:19:16 +02:00
|
|
|
#include "core/plugin.h"
|
|
|
|
|
#include "logger.h"
|
|
|
|
|
|
|
|
|
|
#include "aws/module_aws_instruments.h"
|
|
|
|
|
|
|
|
|
|
class AWSSupport : public satdump::Plugin
|
|
|
|
|
{
|
|
|
|
|
public:
|
2025-05-31 20:26:47 +02:00
|
|
|
std::string getID() { return "aws_support"; }
|
2024-09-16 01:19:16 +02:00
|
|
|
|
2025-08-13 22:42:18 +02:00
|
|
|
void init()
|
|
|
|
|
{
|
|
|
|
|
satdump::eventBus->register_handler<satdump::pipeline::RegisterModulesEvent>(registerPluginsHandler);
|
|
|
|
|
satdump::eventBus->register_handler<satdump::products::RequestImageCalibratorEvent>(provideImageCalibratorHandler);
|
|
|
|
|
}
|
2024-09-16 01:19:16 +02:00
|
|
|
|
2025-05-31 20:26:47 +02:00
|
|
|
static void registerPluginsHandler(const satdump::pipeline::RegisterModulesEvent &evt) { REGISTER_MODULE_EXTERNAL(evt.modules_registry, aws::AWSInstrumentsDecoderModule); }
|
2025-08-13 22:42:18 +02:00
|
|
|
|
|
|
|
|
static void provideImageCalibratorHandler(const satdump::products::RequestImageCalibratorEvent &evt)
|
|
|
|
|
{
|
|
|
|
|
if (evt.id == "aws_mwr")
|
|
|
|
|
evt.calibrators.push_back(std::make_shared<aws::mwr::AWSMWRCalibrator>(evt.products, evt.calib));
|
|
|
|
|
}
|
2024-09-16 01:19:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
PLUGIN_LOADER(AWSSupport)
|