2021-03-31 17:52:26 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "subghz.h"
|
|
|
|
#include "subghz_test_basic.h"
|
|
|
|
#include "subghz_test_packet.h"
|
2021-04-15 08:47:52 +00:00
|
|
|
#include "subghz_static.h"
|
2021-03-31 17:52:26 +00:00
|
|
|
|
|
|
|
#include <furi.h>
|
2021-04-19 16:46:00 +00:00
|
|
|
#include <api-hal.h>
|
2021-03-31 17:52:26 +00:00
|
|
|
#include <gui/gui.h>
|
|
|
|
#include <gui/view_dispatcher.h>
|
|
|
|
#include <gui/modules/submenu.h>
|
|
|
|
|
|
|
|
static const uint32_t subghz_frequencies[] = {
|
|
|
|
301000000,
|
|
|
|
315000000,
|
|
|
|
346000000,
|
|
|
|
385000000,
|
|
|
|
433920000,
|
|
|
|
438900000,
|
|
|
|
463000000,
|
|
|
|
781000000,
|
|
|
|
868000000,
|
2021-04-27 16:00:03 +00:00
|
|
|
868350000,
|
2021-03-31 17:52:26 +00:00
|
|
|
915000000,
|
|
|
|
925000000,
|
|
|
|
};
|
|
|
|
|
2021-04-19 16:46:00 +00:00
|
|
|
static const ApiHalSubGhzPath subghz_frequencies_paths[] = {
|
2021-04-27 16:00:03 +00:00
|
|
|
ApiHalSubGhzPath2, /* 301000000 */
|
|
|
|
ApiHalSubGhzPath2, /* 315000000 */
|
|
|
|
ApiHalSubGhzPath2, /* 346000000 */
|
|
|
|
ApiHalSubGhzPath2, /* 385000000 */
|
|
|
|
ApiHalSubGhzPath1, /* 433920000 */
|
|
|
|
ApiHalSubGhzPath1, /* 438900000 */
|
|
|
|
ApiHalSubGhzPath1, /* 463000000 */
|
|
|
|
ApiHalSubGhzPath3, /* 781000000 */
|
|
|
|
ApiHalSubGhzPath3, /* 868000000 */
|
|
|
|
ApiHalSubGhzPath3, /* 868350000 */
|
|
|
|
ApiHalSubGhzPath3, /* 915000000 */
|
|
|
|
ApiHalSubGhzPath3, /* 925000000 */
|
2021-04-19 16:46:00 +00:00
|
|
|
};
|
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
static const uint32_t subghz_frequencies_count = sizeof(subghz_frequencies) / sizeof(uint32_t);
|
|
|
|
|
|
|
|
struct SubGhz {
|
|
|
|
Gui* gui;
|
|
|
|
|
|
|
|
ViewDispatcher* view_dispatcher;
|
|
|
|
|
|
|
|
Submenu* submenu;
|
|
|
|
|
|
|
|
SubghzTestBasic* subghz_test_basic;
|
|
|
|
|
|
|
|
SubghzTestPacket* subghz_test_packet;
|
2021-04-15 08:47:52 +00:00
|
|
|
|
|
|
|
SubghzStatic* subghz_static;
|
2021-03-31 17:52:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
SubGhzViewMenu,
|
|
|
|
SubGhzViewTestBasic,
|
|
|
|
SubGhzViewTestPacket,
|
2021-04-15 08:47:52 +00:00
|
|
|
SubGhzViewStatic,
|
2021-03-31 17:52:26 +00:00
|
|
|
} SubGhzView;
|