remove random_name API call

This commit is contained in:
Derek Jamison 2023-09-13 22:03:29 -05:00
parent 7e8bdc0559
commit 88db25b8de
5 changed files with 18 additions and 5 deletions

View File

@ -5,7 +5,7 @@ App(
entry_point="wiegand_app", entry_point="wiegand_app",
requires=["gui"], requires=["gui"],
stack_size=2 * 1024, stack_size=2 * 1024,
fap_version=(1, 1), fap_version=(1, 2),
fap_icon="wiegand.png", fap_icon="wiegand.png",
fap_category="GPIO", fap_category="GPIO",
) )

View File

@ -10,7 +10,7 @@ void wiegand_instructions_scene_on_enter(void* context) {
15, 15,
128, 128,
40, 40,
"Version 1.1\n" "Version 1.2\n"
"Only use on devices you own!\n" "Only use on devices you own!\n"
"Connect D0 (Green) to pin A4\n" "Connect D0 (Green) to pin A4\n"
"Connect D1 (White) to pin A7\n" "Connect D1 (White) to pin A7\n"

View File

@ -66,7 +66,20 @@ void wiegand_save(void* context) {
void wiegand_save_scene_on_enter(void* context) { void wiegand_save_scene_on_enter(void* context) {
App* app = context; App* app = context;
text_input_reset(app->text_input); text_input_reset(app->text_input);
set_random_name(app->file_name, WIEGAND_KEY_NAME_SIZE);
FuriHalRtcDateTime datetime;
furi_hal_rtc_get_datetime(&datetime);
snprintf(
app->file_name,
25,
"%02d%02d%02d_%02d%02d%02d",
datetime.year,
datetime.month,
datetime.day,
datetime.hour,
datetime.minute,
datetime.second);
// set_random_name(app->file_name, WIEGAND_KEY_NAME_SIZE);
text_input_set_header_text(app->text_input, "Name the key"); text_input_set_header_text(app->text_input, "Name the key");
text_input_set_result_callback( text_input_set_result_callback(

View File

@ -1,5 +1,4 @@
#include "../wiegand.h" #include "../wiegand.h"
#include <furi_hal.h>
FuriTimer* timer = NULL; FuriTimer* timer = NULL;

View File

@ -1,13 +1,14 @@
#pragma once #pragma once
#include <furi.h> #include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h> #include <gui/gui.h>
#include <gui/view_dispatcher.h> #include <gui/view_dispatcher.h>
#include <gui/scene_manager.h> #include <gui/scene_manager.h>
#include <gui/modules/widget.h> #include <gui/modules/widget.h>
#include <gui/modules/submenu.h> #include <gui/modules/submenu.h>
#include <gui/modules/text_input.h> #include <gui/modules/text_input.h>
#include <lib/toolbox/random_name.h> // #include <lib/toolbox/random_name.h>
#include <notification/notification.h> #include <notification/notification.h>
#include <notification/notification_messages.h> #include <notification/notification_messages.h>
#include <dialogs/dialogs.h> #include <dialogs/dialogs.h>