#include "main.h"

typedef void (*ToggleFunc)(void);
typedef void (*DelayFunc)(uint32_t);

static void toggleLoop(ToggleFunc toggle, DelayFunc delayFunc, uint8_t iterations, uint32_t delayTime);

MODClassStruct MODClass = {
    .Loop = toggleLoop,
};

static void toggleLoop(ToggleFunc toggle, DelayFunc delayFunc, uint8_t iterations, uint32_t delayTime)
{
    for (uint8_t i = 0; i < iterations; i++)
    {
        toggle();
        delayFunc(delayTime);
    }
}

LoraCommandParams cmd_params[] = {
    {"6", "1", "0", "0"},
    {"3", "1", "0", "0"},
    {"7", "1", "0", "0"},
    {"5", "1", "0", "0"},
    {"4", "1", "0", "0"},
    {"6", "0", "0", "0"},
    {"3", "0", "0", "0"},
    {"7", "0", "0", "0"},
    {"5", "0", "0", "0"},
    {"4", "0", "0", "0"},
    {"0", "0", "1", "0"},
    {"0", "0", "0", "1"},
};

rc_data_t *rc_data(void)
{
    static rc_data_t instance = {0};
    return &instance;
}
