2021-03-11 12:31:07 +03: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 17:09:02 +03:00
|
|
|
BtViewTestCarrier,
|
2021-03-11 12:31:07 +03:00
|
|
|
BtViewTestPacketTx,
|
2021-06-02 17:09:02 +03:00
|
|
|
BtViewTestPacketRx,
|
2021-03-11 12:31:07 +03:00
|
|
|
BtViewStartApp,
|
|
|
|
} BtView;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
BtStateType type;
|
|
|
|
BtTestChannel channel;
|
|
|
|
BtTestPower power;
|
2021-06-02 17:09:02 +03:00
|
|
|
float rssi;
|
|
|
|
} BtViewTestCarrierModel;
|
2021-03-11 12:31:07 +03:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
BtStateType type;
|
|
|
|
BtTestChannel channel;
|
|
|
|
BtTestDataRate datarate;
|
2021-06-02 17:09:02 +03:00
|
|
|
uint16_t packets_sent;
|
2021-03-11 12:31:07 +03:00
|
|
|
} BtViewTestPacketTxModel;
|
|
|
|
|
|
|
|
typedef struct {
|
2021-06-02 17:09:02 +03:00
|
|
|
BtStateType type;
|
2021-03-11 12:31:07 +03:00
|
|
|
BtTestChannel channel;
|
2021-06-02 17:09:02 +03:00
|
|
|
BtTestDataRate datarate;
|
|
|
|
float rssi;
|
|
|
|
uint16_t packets_received;
|
|
|
|
} BtViewTestPacketRxModel;
|
2021-03-11 12:31:07 +03:00
|
|
|
|
2021-06-02 17:09:02 +03:00
|
|
|
void bt_view_test_carrier_draw(Canvas* canvas, void* model);
|
2021-03-11 12:31:07 +03:00
|
|
|
|
2021-06-02 17:09:02 +03:00
|
|
|
bool bt_view_test_carrier_input(InputEvent* event, void* context);
|
2021-03-11 12:31:07 +03: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 17:09:02 +03:00
|
|
|
void bt_view_test_packet_rx_draw(Canvas* canvas, void* model);
|
2021-03-11 12:31:07 +03:00
|
|
|
|
2021-06-02 17:09:02 +03:00
|
|
|
bool bt_view_test_packet_rx_input(InputEvent* event, void* context);
|
2021-03-11 12:31:07 +03:00
|
|
|
|
|
|
|
void bt_view_app_draw(Canvas* canvas, void* model);
|