Skip to content

Commit

Permalink
Merge pull request #25 from leedave/feature/fixes_0.99.1
Browse files Browse the repository at this point in the history
Feature/fixes 0.99.1
  • Loading branch information
leedave authored Mar 14, 2024
2 parents be7ffc0 + b27b217 commit b9b9e89
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 25 deletions.
2 changes: 1 addition & 1 deletion 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.3",
fap_version="1.4",
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
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.4
- Fixed some restrictions that prevented build under 0.99.1

## v1.3
- Fixed some memory leaks
- Changed Subghz Protocol Registry to Fipper API conform variant
Expand Down
12 changes: 6 additions & 6 deletions helpers/meal_pager_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,26 +223,26 @@ void meal_pager_set_max_values(void* context) {
}
if(app->first_station > app->max_station) {
app->first_station = app->max_station;
snprintf(app->text_store[0], 5, "%lu", app->first_station);
snprintf(app->text_store[0], 20, "%lu", app->first_station);
}
if(app->last_station > app->max_station) {
app->last_station = app->max_station;
snprintf(app->text_store[1], 5, "%lu", app->last_station);
snprintf(app->text_store[1], 20, "%lu", app->last_station);
}
if(app->last_station < app->first_station) {
app->last_station = app->first_station;
snprintf(app->text_store[1], 5, "%lu", app->last_station);
snprintf(app->text_store[1], 20, "%lu", app->last_station);
}
if(app->first_pager > app->max_pager) {
app->first_pager = app->max_pager;
snprintf(app->text_store[2], 4, "%lu", app->first_pager);
snprintf(app->text_store[2], 20, "%lu", app->first_pager);
}
if(app->last_pager > app->max_pager) {
app->last_pager = app->max_pager;
snprintf(app->text_store[3], 4, "%lu", app->last_pager);
snprintf(app->text_store[3], 20, "%lu", app->last_pager);
}
if(app->last_pager < app->first_pager) {
app->last_pager = app->first_pager;
snprintf(app->text_store[3], 4, "%lu", app->last_pager);
snprintf(app->text_store[3], 20, "%lu", app->last_pager);
}
}
6 changes: 3 additions & 3 deletions helpers/retekess/meal_pager_retekess_t119.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void meal_pager_retekess_t119_generate_pager(
//FURI_LOG_D(TAG, "Manchester: %s", manchester);
char* rawSignal = genRawDataT119(200, 600, manchester);
//FURI_LOG_D(TAG, "RAW_Data: %s", rawSignal);
for(u_int32_t i = 1; app->repeats >= i; i++) {
for(uint32_t i = 1; app->repeats >= i; i++) {
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
}
//flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
Expand All @@ -90,7 +90,7 @@ static void
uint32ToBinaray(station, stationId, 13);
reverse(stationId);
meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
meal_pager_retekess_t119_generate_pager(app, stationId, i, ff);
//furi_thread_flags_wait(0, FuriFlagWaitAny, 1);
if(app->stop_transmit) {
Expand All @@ -117,7 +117,7 @@ bool meal_pager_retekess_t119_generate_all(void* context) {
return success;
}

for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
for(uint32_t i = app->current_station; i <= app->last_station; i++) {
meal_pager_retekess_t119_generate_station(app, i, ff);
//furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
if(app->stop_transmit) {
Expand Down
6 changes: 3 additions & 3 deletions helpers/retekess/meal_pager_retekess_td157.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void meal_pager_retekess_td157_generate_pager(
customConcat(fullId, actionId);
char* manchester = encManchester(fullId, 0);
char* rawSignal = genRawDataTD157(200, 600, manchester);
for(u_int32_t i = 1; app->repeats >= i; i++) {
for(uint32_t i = 1; app->repeats >= i; i++) {
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
}
free(manchester);
Expand All @@ -77,7 +77,7 @@ static void
uint32ToBinaray(station, stationId, 10);
//reverse(stationId);
meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
meal_pager_retekess_td157_generate_pager(app, stationId, i, ff);
if(app->stop_transmit) {
break;
Expand All @@ -103,7 +103,7 @@ bool meal_pager_retekess_td157_generate_all(void* context) {
return success;
}

for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
for(uint32_t i = app->current_station; i <= app->last_station; i++) {
meal_pager_retekess_td157_generate_station(app, i, ff);
if(app->stop_transmit) {
break;
Expand Down
6 changes: 3 additions & 3 deletions helpers/retekess/meal_pager_retekess_td165.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void meal_pager_retekess_td165_generate_pager(
customConcat(fullId, actionId);
char* manchester = encManchester(fullId, 0);
char* rawSignal = genRawDataTD165(200, 600, manchester);
for(u_int32_t i = 1; app->repeats >= i; i++) {
for(uint32_t i = 1; app->repeats >= i; i++) {
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
}
free(manchester);
Expand All @@ -79,7 +79,7 @@ static void
uint32ToBinaray(station, stationId, 13);
reverse(stationId);
meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
meal_pager_retekess_td165_generate_pager(app, stationId, i, ff);
if(app->stop_transmit) {
break;
Expand All @@ -105,7 +105,7 @@ bool meal_pager_retekess_td165_generate_all(void* context) {
return success;
}

for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
for(uint32_t i = app->current_station; i <= app->last_station; i++) {
meal_pager_retekess_td165_generate_station(app, i, ff);
if(app->stop_transmit) {
break;
Expand Down
6 changes: 3 additions & 3 deletions helpers/retekess/meal_pager_retekess_td174.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void meal_pager_retekess_td174_generate_pager(
customConcat(fullId, pagerId);
char* manchester = encManchester(fullId, 0);
char* rawSignal = genRawDataTd174(300, 900, manchester);
for(u_int32_t i = 1; app->repeats >= i; i++) {
for(uint32_t i = 1; app->repeats >= i; i++) {
flipper_format_write_string_cstr(ff, "RAW_Data", rawSignal);
}
free(manchester);
Expand All @@ -82,7 +82,7 @@ static void
uint32ToBinaray(station, stationId, 13);
reverse(stationId);
meal_pager_transmit_model_set_station(app->meal_pager_transmit, app->current_station);
for(u_int32_t i = app->current_pager; i <= app->last_pager; i++) {
for(uint32_t i = app->current_pager; i <= app->last_pager; i++) {
meal_pager_retekess_td174_generate_pager(app, stationId, i, ff);
if(app->stop_transmit) {
break;
Expand All @@ -108,7 +108,7 @@ bool meal_pager_retekess_td174_generate_all(void* context) {
return success;
}

for(u_int32_t i = app->current_station; i <= app->last_station; i++) {
for(uint32_t i = app->current_station; i <= app->last_station; i++) {
meal_pager_retekess_td174_generate_station(app, i, ff);
//furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
if(app->stop_transmit) {
Expand Down
2 changes: 1 addition & 1 deletion scenes/meal_pager_scene_set_first_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool meal_pager_scene_set_first_pager_on_event(void* context, SceneManagerEvent
app->first_pager = atoi(app->text_store[2]);
if(app->first_pager > app->max_pager) {
app->first_pager = app->max_pager;
snprintf(app->text_store[2], 4, "%lu", app->first_pager);
snprintf(app->text_store[2], 20, "%lu", app->first_pager);
}
app->first_pager_char = app->text_store[2];
scene_manager_previous_scene(app->scene_manager);
Expand Down
2 changes: 1 addition & 1 deletion scenes/meal_pager_scene_set_first_station.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool meal_pager_scene_set_first_station_on_event(void* context, SceneManagerEven
app->first_station = atoi(app->text_store[0]);
if(app->first_station > app->max_station) {
app->first_station = app->max_station;
snprintf(app->text_store[0], 5, "%lu", app->first_station);
snprintf(app->text_store[0], 20, "%lu", app->first_station);
}
app->first_station_char = app->text_store[0];
scene_manager_previous_scene(app->scene_manager);
Expand Down
4 changes: 2 additions & 2 deletions scenes/meal_pager_scene_set_last_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ bool meal_pager_scene_set_last_pager_on_event(void* context, SceneManagerEvent e
app->last_pager = atoi(app->text_store[3]);
if(app->last_pager > app->max_pager) {
app->last_pager = app->max_pager;
snprintf(app->text_store[3], 4, "%lu", app->last_pager);
snprintf(app->text_store[3], 20, "%lu", app->last_pager);
}
if(app->last_pager < app->first_pager) {
app->last_pager = app->first_pager;
snprintf(app->text_store[3], 4, "%lu", app->last_pager);
snprintf(app->text_store[3], 20, "%lu", app->last_pager);
}
app->last_pager_char = app->text_store[3];
scene_manager_previous_scene(app->scene_manager);
Expand Down
4 changes: 2 additions & 2 deletions scenes/meal_pager_scene_set_last_station.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ bool meal_pager_scene_set_last_station_on_event(void* context, SceneManagerEvent
app->last_station = atoi(app->text_store[1]);
if(app->last_station > app->max_station) {
app->last_station = app->max_station;
snprintf(app->text_store[1], 5, "%lu", app->last_station);
snprintf(app->text_store[1], 20, "%lu", app->last_station);
}
if(app->last_station < app->first_station) {
app->last_station = app->first_station;
snprintf(app->text_store[1], 5, "%lu", app->last_station);
snprintf(app->text_store[1], 20, "%lu", app->last_station);
}
app->last_station_char = app->text_store[1];
scene_manager_previous_scene(app->scene_manager);
Expand Down

0 comments on commit b9b9e89

Please sign in to comment.