Skip to content

Commit ee5370b

Browse files
authored
Merge pull request #8 from jaylikesbunda/v1.0.7
V1.0.7
2 parents a0c698a + fa31a76 commit ee5370b

File tree

9 files changed

+544
-357
lines changed

9 files changed

+544
-357
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ A Flipper Zero application for interfacing with the Ghost ESP32 firmware
4141
- Made by [Spooky](https://github.com/Spooks4576)
4242
- Additional contributions by [Jay Candel](https://github.com/jaylikesbunda)
4343

44+
4445
## Support
4546
- For support, please open an [issue](https://github.com/Spooks4576/ghost_esp_app/issues) on the repository or contact [Jay](https://github.com/jaylikesbunda) (@fuckyoudeki on Discord) or [Spooky](https://github.com/Spooks4576).
4647

4748

4849

50+

application.fam

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
App(
44
appid="ghost_esp", # Must be unique
55
name="[ESP32] Ghost ESP", # Displayed in menus
6-
apptype=FlipperAppType.EXTERNAL,
6+
apptype=FlipperAppType.EXTERNAL, # type: ignore
77
entry_point="ghost_esp_app",
8-
stack_size=3 * 1024,
8+
stack_size=6 * 1024,
99
fap_category="GPIO/ESP",
1010
# Optional values
11-
fap_version="0.1",
11+
icon="A_GhostESP_14",
12+
fap_version="1.0.7",
1213
fap_icon="ghost_esp.png", # 10x10 1-bit PNG
1314
fap_icon_assets="images", # Image assets to compile for this application
1415
)

docs/changelog.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
- Added 'App Info' Button in Settings
3434
- Misc Changes (mostly to UI)
3535

36-
3736
## v1.0.5
3837
- Commands will silently fail if UART isn't working rather than crashing
3938
- Fixed double-free memory issue by removing stream buffer cleanup from the worker thread
@@ -43,7 +42,6 @@
4342
- Optimized storage initialization by deferring file operations until needed
4443
- Improved directory creation efficiency in storage handling
4544

46-
4745
## v1.0.6
4846
- Replaced 'Info' command in ESP Check with 'Stop'
4947
- Slightly improved optional UART filtering
@@ -54,10 +52,15 @@
5452
- Renamed CONF menu option to SET to better align with actual Settings menu since it's header is "Settings" and there is a configuration submenu
5553
- Replaced textbox for ESP Connection Check with scrollable Confirmation View
5654

57-
## TODO
55+
## v1.0.7
56+
- Increased buffers and stacks: MAX_BUFFER_SIZE to 8KB, INITIAL_BUFFER_SIZE to 4KB, BUFFER_CLEAR_SIZE to 128B, uart/app stacks to 4KB/6KB
57+
- Added buffer_mutex with proper timeout handling
58+
- Added Marauder-style data handling
59+
- Improved ESP connection reliability
60+
- Added view log from start/end configuration setting
61+
- Added line buffering with overflow detection, boundary protection and pre-flush on mode switches
5862

63+
## TODO
5964
- Replaced select a utility text with prompt to show NEW Help Menu
60-
- Add view log from start/end configuration setting
61-
- Settings get sent to board and get pulled from on ESP Check or Init
6265
- IMPROVE optional filtering to UART output
6366
- Improve directory organisation!!!!!!!!!!!!!!!!!!!!!!!!!!!!

settings_def.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const char* const SETTING_VALUE_NAMES_RGB_MODE[] = {"Stealth", "Normal", "Rainbo
77
const char* const SETTING_VALUE_NAMES_CHANNEL_HOP[] = {"500ms", "1000ms", "2000ms", "3000ms", "4000ms"};
88
const char* const SETTING_VALUE_NAMES_BOOL[] = {"False", "True"};
99
const char* const SETTING_VALUE_NAMES_ACTION[] = {"Press OK", "Press OK"};
10+
const char* const SETTING_VALUE_NAMES_LOG_VIEW[] = {"End", "Start"};
1011

1112
#include "settings_ui.h" // Add this include at the top
1213

@@ -100,6 +101,15 @@ const SettingMetadata SETTING_METADATA[SETTINGS_COUNT] = {
100101
.callback = NULL
101102
},
102103
.is_action = true
104+
},
105+
[SETTING_VIEW_LOGS_FROM_START] = {
106+
.name = "View Logs From",
107+
.data.setting = {
108+
.max_value = 1,
109+
.value_names = SETTING_VALUE_NAMES_LOG_VIEW, // We'll define this
110+
.uart_command = NULL // No UART command needed since this is handled locally
111+
},
112+
.is_action = false
103113
}
104114
};
105115
// Update the function signature to include the is_action flag

settings_def.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ typedef enum {
1111
SETTING_ENABLE_RANDOM_BLE_MAC,
1212
SETTING_STOP_ON_BACK,
1313
SETTING_ENABLE_FILTERING,
14+
SETTING_VIEW_LOGS_FROM_START,
1415
SETTING_SHOW_INFO,
1516
SETTING_REBOOT_ESP,
1617
SETTING_CLEAR_LOGS,
@@ -50,6 +51,7 @@ typedef struct {
5051
uint8_t enable_random_ble_mac_index;
5152
uint8_t stop_on_back_index;
5253
uint8_t enable_filtering_index;
54+
uint8_t view_logs_from_start_index;
5355
uint8_t reboot_esp_index;
5456
uint8_t clear_logs_index;
5557
uint8_t clear_nvs_index;

settings_ui.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ bool settings_set(Settings* settings, SettingKey key, uint8_t value, void* conte
176176
}
177177
}
178178
break;
179+
case SETTING_VIEW_LOGS_FROM_START:
180+
if(settings->view_logs_from_start_index != value) {
181+
settings->view_logs_from_start_index = value;
182+
changed = true;
183+
}
184+
break;
179185

180186
default:
181187
return false;
@@ -211,6 +217,9 @@ uint8_t settings_get(const Settings* settings, SettingKey key) {
211217

212218
case SETTING_ENABLE_FILTERING:
213219
return settings->enable_filtering_index;
220+
221+
case SETTING_VIEW_LOGS_FROM_START:
222+
return settings->view_logs_from_start_index;
214223

215224
case SETTING_REBOOT_ESP:
216225
case SETTING_CLEAR_LOGS:
@@ -382,7 +391,7 @@ bool settings_custom_event_callback(void* context, uint32_t event_id) {
382391
"Updated by: Jay Candel\n"
383392
"Built with <3";
384393

385-
confirmation_view_set_header(app_state->confirmation_view, "Ghost ESP v1.0.6");
394+
confirmation_view_set_header(app_state->confirmation_view, "Ghost ESP v1.0.7");
386395
confirmation_view_set_text(app_state->confirmation_view, info_text);
387396

388397
// Save current view before switching

uart_storage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct UartStorageContext {
1313
UartContext* parentContext;
1414
bool HasOpenedFile;
1515
bool IsWritingToFile;
16+
bool view_logs_from_start;
1617
};
1718

1819
UartStorageContext* uart_storage_init(UartContext* parentContext);

0 commit comments

Comments
 (0)