Skip to content

Commit

Permalink
upd meal pager
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Feb 10, 2024
1 parent af7d2cf commit 90e6ce0
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion non_catalog_apps/meal_pager/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
6 changes: 6 additions & 0 deletions non_catalog_apps/meal_pager/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion non_catalog_apps/meal_pager/helpers/subghz/subghz_txrx.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "subghz_txrx_i.h"

#include <lib/subghz/protocols/protocol_items.h>
#include <lib/subghz/subghz_protocol_registry.h>
#include <applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h>
#include <lib/subghz/devices/cc1101_int/cc1101_int_interconnect.h>

Expand Down
12 changes: 4 additions & 8 deletions non_catalog_apps/meal_pager/meal_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -123,20 +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);
furi_record_close(RECORD_NOTIFICATION);
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
Expand Down
1 change: 1 addition & 0 deletions non_catalog_apps/meal_pager/meal_pager_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions non_catalog_apps/meal_pager/views/meal_pager_startscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit 90e6ce0

Please sign in to comment.