mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-28 11:26:32 +03:00
d040515f84
* bt: introduce bt CLI commands * api-hal-bt: add get rssi * bt: fix cli commands * bt: fix typos * bt: refacrote bt test names * ble gui continue * bt: rework carrier test gui * bt: rework send packets test gui * bt: rework receive packets test * api-hal-bt: change rssi return * bt: refactore bt gui Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com> Co-authored-by: SG <who.just.the.doctor@gmail.com>
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
#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 {
|
|
BtViewTestCarrier,
|
|
BtViewTestPacketTx,
|
|
BtViewTestPacketRx,
|
|
BtViewStartApp,
|
|
} BtView;
|
|
|
|
typedef struct {
|
|
BtStateType type;
|
|
BtTestChannel channel;
|
|
BtTestPower power;
|
|
float rssi;
|
|
} BtViewTestCarrierModel;
|
|
|
|
typedef struct {
|
|
BtStateType type;
|
|
BtTestChannel channel;
|
|
BtTestDataRate datarate;
|
|
uint16_t packets_sent;
|
|
} BtViewTestPacketTxModel;
|
|
|
|
typedef struct {
|
|
BtStateType type;
|
|
BtTestChannel channel;
|
|
BtTestDataRate datarate;
|
|
float rssi;
|
|
uint16_t packets_received;
|
|
} BtViewTestPacketRxModel;
|
|
|
|
void bt_view_test_carrier_draw(Canvas* canvas, void* model);
|
|
|
|
bool bt_view_test_carrier_input(InputEvent* event, void* context);
|
|
|
|
void bt_view_test_packet_tx_draw(Canvas* canvas, void* model);
|
|
|
|
bool bt_view_test_packet_tx_input(InputEvent* event, void* context);
|
|
|
|
void bt_view_test_packet_rx_draw(Canvas* canvas, void* model);
|
|
|
|
bool bt_view_test_packet_rx_input(InputEvent* event, void* context);
|
|
|
|
void bt_view_app_draw(Canvas* canvas, void* model);
|