Skip to content

Commit

Permalink
New random file name API fix (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
nminaylov authored Sep 16, 2023
1 parent 4161a07 commit befe148
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 8 deletions.
4 changes: 4 additions & 0 deletions nfc_rfid_detector/.catalog/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 1.1
- App rename, removed About screen
## 1.0
- Initial release
2 changes: 1 addition & 1 deletion nfc_rfid_detector/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ App(
requires=["gui"],
stack_size=4 * 1024,
fap_description="Identify the reader type: NFC (13 MHz) and/or RFID (125 KHz).",
fap_version="1.0",
fap_version="1.1",
fap_icon="nfc_rfid_detector_10px.png",
fap_category="Tools",
fap_icon_assets="images",
Expand Down
12 changes: 12 additions & 0 deletions picopass/.catalog/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## 1.5
- New random filename API
## 1.4
- Optimize crypto speed to fix compatibliity with Signo and OmniKey readers
## 1.3
- Show standard key instead of hex bytes when detected
## 1.2
- Sentinel bit remove
## 1.1
- Key dicts moved to app assets
## 1.0
- Initial release
2 changes: 1 addition & 1 deletion picopass/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ App(
],
stack_size=4 * 1024,
fap_description="App to communicate with NFC tags using the PicoPass(iClass) format",
fap_version="1.4",
fap_version="1.5",
fap_icon="125_10px.png",
fap_category="NFC",
fap_libs=["mbedtls"],
Expand Down
1 change: 1 addition & 0 deletions picopass/picopass_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#define PICOPASS_APP_FOLDER ANY_PATH("picopass")
#define PICOPASS_APP_EXTENSION ".picopass"
#define PICOPASS_APP_FILE_PREFIX "Picopass"
#define PICOPASS_APP_SHADOW_EXTENSION ".pas"

#define PICOPASS_DICT_KEY_BATCH_SIZE 10
Expand Down
2 changes: 1 addition & 1 deletion picopass/scenes/picopass_scene_key_input.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../picopass_i.h"
#include <lib/toolbox/random_name.h>
#include <lib/toolbox/name_generator.h>
#include <gui/modules/validators.h>
#include <toolbox/path.h>

Expand Down
5 changes: 3 additions & 2 deletions picopass/scenes/picopass_scene_save_name.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../picopass_i.h"
#include <lib/toolbox/random_name.h>
#include <lib/toolbox/name_generator.h>
#include <gui/modules/validators.h>
#include <toolbox/path.h>

Expand All @@ -16,7 +16,8 @@ void picopass_scene_save_name_on_enter(void* context) {
TextInput* text_input = picopass->text_input;
bool dev_name_empty = false;
if(!strcmp(picopass->dev->dev_name, "")) {
set_random_name(picopass->text_store, sizeof(picopass->text_store));
name_generator_make_auto(
picopass->text_store, sizeof(picopass->text_store), PICOPASS_APP_FILE_PREFIX);
dev_name_empty = true;
} else {
picopass_text_store_set(picopass, picopass->dev->dev_name);
Expand Down
4 changes: 4 additions & 0 deletions spi_mem_manager/.catalog/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 1.1
- New random filename API
## 1.0
- Initial release
2 changes: 1 addition & 1 deletion spi_mem_manager/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ App(
requires=["gui"],
stack_size=1 * 2048,
fap_description="Application for reading and writing 25-series SPI memory chips",
fap_version="1.0",
fap_version="1.1",
fap_icon="images/Dip8_10px.png",
fap_category="GPIO",
fap_icon_assets="images",
Expand Down
2 changes: 1 addition & 1 deletion spi_mem_manager/scenes/spi_mem_scene_read_filename.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void spi_mem_scene_read_set_random_filename(SPIMemApp* app) {
size_t filename_start = furi_string_search_rchar(app->file_path, '/');
furi_string_left(app->file_path, filename_start);
}
set_random_name(app->text_buffer, SPI_MEM_TEXT_BUFFER_SIZE);
name_generator_make_auto(app->text_buffer, SPI_MEM_TEXT_BUFFER_SIZE, SPI_MEM_FILE_PREFIX);
}

void spi_mem_scene_read_filename_on_enter(void* context) {
Expand Down
3 changes: 2 additions & 1 deletion spi_mem_manager/spi_mem_app_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <gui/modules/text_input.h>
#include <storage/storage.h>
#include <toolbox/path.h>
#include <toolbox/random_name.h>
#include <toolbox/name_generator.h>
#include "scenes/spi_mem_scene.h"
#include "lib/spi/spi_mem_worker.h"
#include "spi_mem_manager_icons.h"
Expand All @@ -24,6 +24,7 @@

#define TAG "SPIMem"
#define SPI_MEM_FILE_EXTENSION ".bin"
#define SPI_MEM_FILE_PREFIX "SPIMem"
#define SPI_MEM_FILE_NAME_SIZE 100
#define SPI_MEM_TEXT_BUFFER_SIZE 128

Expand Down

0 comments on commit befe148

Please sign in to comment.