2021-03-11 09:31:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "bt_i.h"
|
|
|
|
#include "bt_types.h"
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <gui/canvas.h>
|
|
|
|
#include <furi.h>
|
|
|
|
#include <gui/view_dispatcher.h>
|
|
|
|
#include <gui/view.h>
|
|
|
|
|
|
|
|
typedef enum {
|
2021-06-02 14:09:02 +00:00
|
|
|
BtViewTestCarrier,
|
2021-03-11 09:31:07 +00:00
|
|
|
BtViewTestPacketTx,
|
2021-06-02 14:09:02 +00:00
|
|
|
BtViewTestPacketRx,
|
2021-03-11 09:31:07 +00:00
|
|
|
BtViewStartApp,
|
|
|
|
} BtView;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
BtStateType type;
|
|
|
|
BtTestChannel channel;
|
|
|
|
BtTestPower power;
|
2021-06-02 14:09:02 +00:00
|
|
|
float rssi;
|
|
|
|
} BtViewTestCarrierModel;
|
2021-03-11 09:31:07 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
BtStateType type;
|
|
|
|
BtTestChannel channel;
|
|
|
|
BtTestDataRate datarate;
|
2021-06-02 14:09:02 +00:00
|
|
|
uint16_t packets_sent;
|
2021-03-11 09:31:07 +00:00
|
|
|
} BtViewTestPacketTxModel;
|
|
|
|
|
|
|
|
typedef struct {
|
2021-06-02 14:09:02 +00:00
|
|
|
BtStateType type;
|
2021-03-11 09:31:07 +00:00
|
|
|
BtTestChannel channel;
|
2021-06-02 14:09:02 +00:00
|
|
|
BtTestDataRate datarate;
|
|
|
|
float rssi;
|
|
|
|
uint16_t packets_received;
|
|
|
|
} BtViewTestPacketRxModel;
|
2021-03-11 09:31:07 +00:00
|
|
|
|
2021-06-02 14:09:02 +00:00
|
|
|
void bt_view_test_carrier_draw(Canvas* canvas, void* model);
|
2021-03-11 09:31:07 +00:00
|
|
|
|
2021-06-02 14:09:02 +00:00
|
|
|
bool bt_view_test_carrier_input(InputEvent* event, void* context);
|
2021-03-11 09:31:07 +00:00
|
|
|
|
|
|
|
void bt_view_test_packet_tx_draw(Canvas* canvas, void* model);
|
|
|
|
|
|
|
|
bool bt_view_test_packet_tx_input(InputEvent* event, void* context);
|
|
|
|
|
2021-06-02 14:09:02 +00:00
|
|
|
void bt_view_test_packet_rx_draw(Canvas* canvas, void* model);
|
2021-03-11 09:31:07 +00:00
|
|
|
|
2021-06-02 14:09:02 +00:00
|
|
|
bool bt_view_test_packet_rx_input(InputEvent* event, void* context);
|
2021-03-11 09:31:07 +00:00
|
|
|
|
|
|
|
void bt_view_app_draw(Canvas* canvas, void* model);
|