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 081bdc3 commit aa1a3b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .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 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 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_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 aa1a3b3

Please sign in to comment.