[FL-1363] BLE GUI tests (#505)

* 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>
This commit is contained in:
gornekich
2021-06-02 17:09:02 +03:00
committed by GitHub
parent 8851a240ab
commit d040515f84
7 changed files with 263 additions and 140 deletions

View File

@@ -11,9 +11,9 @@
#include <gui/view.h>
typedef enum {
BtViewTestToneTx,
BtViewTestCarrier,
BtViewTestPacketTx,
BtViewTestToneRx,
BtViewTestPacketRx,
BtViewStartApp,
} BtView;
@@ -21,28 +21,34 @@ typedef struct {
BtStateType type;
BtTestChannel channel;
BtTestPower power;
} BtViewTestToneTxModel;
float rssi;
} BtViewTestCarrierModel;
typedef struct {
BtStateType type;
BtTestChannel channel;
BtTestDataRate datarate;
uint16_t packets_sent;
} BtViewTestPacketTxModel;
typedef struct {
BtStateType type;
BtTestChannel channel;
} BtViewTestRxModel;
BtTestDataRate datarate;
float rssi;
uint16_t packets_received;
} BtViewTestPacketRxModel;
void bt_view_test_tone_tx_draw(Canvas* canvas, void* model);
void bt_view_test_carrier_draw(Canvas* canvas, void* model);
bool bt_view_test_tone_tx_input(InputEvent* event, void* context);
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_tone_rx_draw(Canvas* canvas, void* model);
void bt_view_test_packet_rx_draw(Canvas* canvas, void* model);
bool bt_view_test_tone_rx_input(InputEvent* event, void* context);
bool bt_view_test_packet_rx_input(InputEvent* event, void* context);
void bt_view_app_draw(Canvas* canvas, void* model);