Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit efbcdc2

Browse files
committed
Sync system apps --nobuild
1 parent 76534b0 commit efbcdc2

38 files changed

Lines changed: 1491 additions & 414 deletions

applications/system/hex_viewer/application.fam

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ App(
88
"dialogs",
99
],
1010
stack_size=2 * 1024,
11-
order=20,
12-
fap_icon="icons/hex_10px.png",
11+
fap_icon="icons/hex_10px.bmp",
1312
fap_icon_assets="icons",
1413
fap_category="Tools",
1514
fap_author="@QtRoS",
1615
fap_version="2.0",
17-
fap_description="App allows to view various files as HEX.",
16+
fap_description="App allows to view various files as HEX",
1817
)

applications/system/hex_viewer/helpers/hex_viewer_storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ bool hex_viewer_open_file(void* context, const char* file_path) {
123123
// TODO Separate function?
124124
if(hex_viewer->model->stream) {
125125
buffered_file_stream_close(hex_viewer->model->stream);
126-
stream_free(hex_viewer->model->stream); // TODO Check
126+
stream_free(hex_viewer->model->stream);
127127
hex_viewer->model->file_offset = 0;
128128
}
129129

applications/system/hex_viewer/hex_viewer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ HexViewer* hex_viewer_app_alloc() {
8787
void hex_viewer_app_free(HexViewer* app) {
8888
furi_assert(app);
8989

90-
if(app->model->stream) buffered_file_stream_close(app->model->stream);
90+
if(app->model->stream) {
91+
buffered_file_stream_close(app->model->stream);
92+
stream_free(app->model->stream);
93+
}
9194

9295
// Scene manager
9396
scene_manager_free(app->scene_manager);

applications/system/hex_viewer/hex_viewer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ typedef struct {
4343
Stream* stream;
4444
} HexViewerModel;
4545

46-
// TODO Clean
4746
typedef struct {
4847
HexViewerModel* model;
4948

102 Bytes
Binary file not shown.

applications/system/hex_viewer/scenes/hex_viewer_scene_scroll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void hex_viewer_scene_scroll_on_enter(void* context) {
1313

1414
TextInput* text_input = app->text_input;
1515

16-
text_input_set_header_text(text_input, "Scroll to percent (0..100)");
16+
text_input_set_header_text(text_input, "Scroll to percentage (0..100)");
1717
text_input_set_result_callback(
1818
text_input,
1919
hex_viewer_scene_scroll_callback,

applications/system/hex_viewer/views/hex_viewer_startscreen.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,17 @@ void hex_viewer_startscreen_draw(Canvas* canvas, HexViewerStartscreenModel* mode
6161
width,
6262
0,
6363
ROW_HEIGHT * HEX_VIEWER_LINES_ON_SCREEN,
64-
first_line_on_screen, // TODO
64+
first_line_on_screen,
6565
line_count - (HEX_VIEWER_LINES_ON_SCREEN - 1));
6666
}
6767

6868
char temp_buf[32];
6969
uint32_t row_iters = model->file_read_bytes / HEX_VIEWER_BYTES_PER_LINE;
7070
if(model->file_read_bytes % HEX_VIEWER_BYTES_PER_LINE != 0) row_iters += 1;
7171

72+
// For the rest of drawing.
73+
canvas_set_font(canvas, FontKeyboard);
74+
7275
for(uint32_t i = 0; i < row_iters; ++i) {
7376
uint32_t bytes_left_per_row = model->file_read_bytes - i * HEX_VIEWER_BYTES_PER_LINE;
7477
bytes_left_per_row = MIN(bytes_left_per_row, HEX_VIEWER_BYTES_PER_LINE);
@@ -79,21 +82,21 @@ void hex_viewer_startscreen_draw(Canvas* canvas, HexViewerStartscreenModel* mode
7982
for(uint32_t j = 0; j < bytes_left_per_row; ++j)
8083
if(!isprint((int)temp_buf[j])) temp_buf[j] = '.';
8184

82-
canvas_set_font(canvas, FontKeyboard);
85+
//canvas_set_font(canvas, FontKeyboard);
8386
canvas_draw_str(canvas, LEFT_OFFSET, TOP_OFFSET + i * ROW_HEIGHT, temp_buf);
8487
} else {
8588
uint32_t addr = model->file_offset + i * HEX_VIEWER_BYTES_PER_LINE;
8689
snprintf(temp_buf, 32, "%04lX", addr);
8790

88-
canvas_set_font(canvas, FontKeyboard);
91+
//canvas_set_font(canvas, FontKeyboard);
8992
canvas_draw_str(canvas, LEFT_OFFSET, TOP_OFFSET + i * ROW_HEIGHT, temp_buf);
9093
}
9194

9295
char* p = temp_buf;
9396
for(uint32_t j = 0; j < bytes_left_per_row; ++j)
9497
p += snprintf(p, 32, "%02X ", model->file_bytes[i][j]);
9598

96-
canvas_set_font(canvas, FontKeyboard);
99+
//canvas_set_font(canvas, FontKeyboard);
97100
canvas_draw_str(canvas, LEFT_OFFSET + 41, TOP_OFFSET + i * ROW_HEIGHT, temp_buf);
98101
}
99102

@@ -125,7 +128,7 @@ bool hex_viewer_startscreen_input(InputEvent* event, void* context) {
125128
furi_assert(context);
126129
HexViewerStartscreen* instance = context;
127130
HexViewer* app = instance->context; // TO so good, but works
128-
// TODO InputTypeShort?
131+
129132
if(event->type == InputTypeRelease || event->type == InputTypeRepeat) {
130133
switch(event->key) {
131134
case InputKeyBack:

applications/system/hid_app/application.fam

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ App(
44
apptype=FlipperAppType.EXTERNAL,
55
entry_point="hid_usb_app",
66
stack_size=1 * 1024,
7-
fap_description="Use Flipper as a HID remote control over USB",
8-
fap_version="1.0",
97
fap_category="USB",
108
fap_icon="hid_usb_10px.png",
119
fap_icon_assets="assets",
@@ -19,8 +17,6 @@ App(
1917
apptype=FlipperAppType.EXTERNAL,
2018
entry_point="hid_ble_app",
2119
stack_size=1 * 1024,
22-
fap_description="Use Flipper as a HID remote control over Bluetooth",
23-
fap_version="1.0",
2420
fap_category="Bluetooth",
2521
fap_icon="hid_ble_10px.png",
2622
fap_icon_assets="assets",
340 Bytes
Loading
362 Bytes
Loading

0 commit comments

Comments
 (0)