From 460d7c8a8faf60573f1c62d8b238afffc54f0090 Mon Sep 17 00:00:00 2001 From: David Lee Date: Thu, 8 Feb 2024 09:09:52 +0100 Subject: [PATCH] Version 1.3 --- application.fam | 2 +- docs/changelog.md | 6 ++++++ helpers/subghz/subghz_txrx.c | 2 +- meal_pager.c | 13 +++++++------ meal_pager_i.h | 1 + views/meal_pager_startscreen.c | 3 +++ 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/application.fam b/application.fam index 8f9b757a95b..6dfdce520da 100644 --- a/application.fam +++ b/application.fam @@ -7,7 +7,7 @@ App( fap_icon="icons/meal_pager_10px.png", fap_icon_assets="icons", fap_category="Sub-Ghz", - fap_version="1.2", + fap_version="1.3", fap_author="leedave", fap_weburl="https://github.com/leedave/flipper-zero-meal-pager", fap_description="This app triggers restaurant pagers in a brute force manner, useful to test if devices are still functional.", diff --git a/docs/changelog.md b/docs/changelog.md index 6d783b4d490..c026d53f9a4 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,9 @@ +## v1.3 +- Fixed some memory leaks +- Changed Subghz Protocol Registry to Fipper API conform variant +- Version number in Start Screen +- Code formatting + ## v1.2 - Fixed Memory bug in Last Station UI - Added auto-correction when entries in First/Last station/pager are out of range diff --git a/helpers/subghz/subghz_txrx.c b/helpers/subghz/subghz_txrx.c index 018d02b6d4a..c0a2be045f3 100644 --- a/helpers/subghz/subghz_txrx.c +++ b/helpers/subghz/subghz_txrx.c @@ -1,6 +1,6 @@ #include "subghz_txrx_i.h" -#include +#include #include #include diff --git a/meal_pager.c b/meal_pager.c index 5a66f3babd7..c2f36064fc7 100644 --- a/meal_pager.c +++ b/meal_pager.c @@ -69,9 +69,6 @@ Meal_Pager* meal_pager_app_alloc() { app->subghz = subghz_alloc(); - // Custom made int keyboard - app->int_input = int_input_alloc(); - // Load configs meal_pager_read_settings(app); @@ -123,15 +120,19 @@ void meal_pager_app_free(Meal_Pager* app) { int_input_free(app->int_input); view_dispatcher_free(app->view_dispatcher); + variable_item_list_free(app->variable_item_list); + meal_pager_transmit_free(app->meal_pager_transmit); + meal_pager_startscreen_free(app->meal_pager_startscreen); furi_record_close(RECORD_GUI); - app->gui = NULL; - app->notification = NULL; - // Close File Browser furi_record_close(RECORD_DIALOGS); + furi_record_close(RECORD_NOTIFICATION); furi_string_free(app->file_path); + app->gui = NULL; + app->notification = NULL; + subghz_free(app->subghz); //Remove whatever is left diff --git a/meal_pager_i.h b/meal_pager_i.h index 2c8de587d55..01e92e2dc7e 100644 --- a/meal_pager_i.h +++ b/meal_pager_i.h @@ -25,6 +25,7 @@ #define SUBGHZ_APP_EXTENSION ".sub" #define SUBGHZ_APP_FOLDER ANY_PATH("subghz") +#define MEAL_PAGER_VERSION "1.3" typedef struct Meal_PagerTransmit Meal_PagerTransmit; typedef struct SubGhz SubGhz; diff --git a/views/meal_pager_startscreen.c b/views/meal_pager_startscreen.c index 88868e871e9..11743757917 100644 --- a/views/meal_pager_startscreen.c +++ b/views/meal_pager_startscreen.c @@ -28,12 +28,15 @@ void meal_pager_startscreen_set_callback( void meal_pager_startscreen_draw(Canvas* canvas, Meal_PagerStartscreenModel* model) { UNUSED(model); + char buffer[64]; canvas_clear(canvas); canvas_set_color(canvas, ColorBlack); canvas_set_font(canvas, FontPrimary); canvas_draw_str_aligned(canvas, 64, 10, AlignCenter, AlignTop, "Restaurant Pager"); canvas_set_font(canvas, FontSecondary); canvas_draw_str_aligned(canvas, 64, 22, AlignCenter, AlignTop, "Trigger Tool"); + snprintf(buffer, sizeof(buffer), "Version: %s", MEAL_PAGER_VERSION); + canvas_draw_str_aligned(canvas, 64, 42, AlignCenter, AlignTop, buffer); elements_button_center(canvas, "Start"); }