mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
Fuzzer App: prtocol carusel prototype
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <furi.h>
|
#include <furi.h>
|
||||||
#include <furi_hal.h>
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t menu_index;
|
uint8_t menu_index;
|
||||||
|
|||||||
1
applications/external/pacs_fuzzer/todo.md
vendored
1
applications/external/pacs_fuzzer/todo.md
vendored
@@ -24,6 +24,7 @@
|
|||||||
- [x] Icon in dialog
|
- [x] Icon in dialog
|
||||||
- [ ] Description and buttons in `field_editor` view
|
- [ ] Description and buttons in `field_editor` view
|
||||||
- [ ] Protocol carousel in `main_menu`
|
- [ ] Protocol carousel in `main_menu`
|
||||||
|
- [x] prototype
|
||||||
- [x] UID
|
- [x] UID
|
||||||
- [x] Simplify the storage and exchange of `uids.data` `uid.data_size` in `views`
|
- [x] Simplify the storage and exchange of `uids.data` `uid.data_size` in `views`
|
||||||
- [x] `UID_MAX_SIZE`
|
- [x] `UID_MAX_SIZE`
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
#include "../lib/worker/protocol.h"
|
#include "../lib/worker/protocol.h"
|
||||||
|
|
||||||
|
#define PROTOCOL_NAME_Y 12
|
||||||
|
// #define PROTOCOL_CAROUSEL
|
||||||
|
|
||||||
struct FuzzerViewMain {
|
struct FuzzerViewMain {
|
||||||
View* view;
|
View* view;
|
||||||
FuzzerViewMainCallback callback;
|
FuzzerViewMainCallback callback;
|
||||||
@@ -84,10 +87,36 @@ void fuzzer_view_main_draw(Canvas* canvas, FuzzerViewMainModel* model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
canvas_set_font(canvas, FontPrimary);
|
canvas_set_font(canvas, FontPrimary);
|
||||||
canvas_draw_str_aligned(canvas, 27, 4, AlignCenter, AlignTop, "<");
|
canvas_draw_str_aligned(canvas, 27, PROTOCOL_NAME_Y, AlignCenter, AlignBottom, "<");
|
||||||
canvas_draw_str_aligned(
|
canvas_draw_str_aligned(
|
||||||
canvas, 64, 4, AlignCenter, AlignTop, fuzzer_proto_get_name(model->proto_index));
|
canvas,
|
||||||
canvas_draw_str_aligned(canvas, 101, 4, AlignCenter, AlignTop, ">");
|
64,
|
||||||
|
PROTOCOL_NAME_Y,
|
||||||
|
AlignCenter,
|
||||||
|
AlignBottom,
|
||||||
|
fuzzer_proto_get_name(model->proto_index));
|
||||||
|
canvas_draw_str_aligned(canvas, 101, PROTOCOL_NAME_Y, AlignCenter, AlignBottom, ">");
|
||||||
|
|
||||||
|
#ifdef PROTOCOL_CAROUSEL
|
||||||
|
canvas_set_font(canvas, FontSecondary);
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas,
|
||||||
|
20,
|
||||||
|
PROTOCOL_NAME_Y,
|
||||||
|
AlignRight,
|
||||||
|
AlignBottom,
|
||||||
|
(model->proto_index > 0) ? fuzzer_proto_get_name(model->proto_index - 1) :
|
||||||
|
fuzzer_proto_get_name((model->proto_max - 1)));
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas,
|
||||||
|
108,
|
||||||
|
PROTOCOL_NAME_Y,
|
||||||
|
AlignLeft,
|
||||||
|
AlignBottom,
|
||||||
|
(model->proto_index < (model->proto_max - 1)) ?
|
||||||
|
fuzzer_proto_get_name(model->proto_index + 1) :
|
||||||
|
fuzzer_proto_get_name(0));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fuzzer_view_main_input(InputEvent* event, void* context) {
|
bool fuzzer_view_main_input(InputEvent* event, void* context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user