Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into mntm-dev
  • Loading branch information
Willy-JL committed Mar 15, 2024
2 parents 4f1ae6b + ce67472 commit edba596
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/lfrfid/protocols/protocol_em4100.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ bool protocol_em4100_write_data(ProtocolEM4100* protocol, void* data) {
request->t5577.block[0] =
(LFRFID_T5577_MODULATION_MANCHESTER | protocol_em4100_get_t5577_bitrate(protocol) |
(2 << LFRFID_T5577_MAXBLOCK_SHIFT));
request->t5577.block[1] = protocol->encoded_data;
request->t5577.block[2] = protocol->encoded_data >> 32;
request->t5577.block[1] = protocol->encoded_data >> 32;
request->t5577.block[2] = protocol->encoded_data;
request->t5577.blocks_to_write = 3;
result = true;
}
Expand Down
9 changes: 9 additions & 0 deletions lib/toolbox/name_generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ void name_generator_make_auto(char* name, size_t max_name_size, const char* pref
name_generator_make_auto_datetime(name, max_name_size, prefix, NULL);
}

void name_generator_make_auto_basic(char* name, size_t max_name_size, const char* prefix) {
if(!furi_hal_rtc_is_flag_set(FuriHalRtcFlagRandomFilename)) {
name_generator_make_detailed_datetime(
name, max_name_size, prefix, NULL, momentum_settings.file_naming_prefix_after);
} else {
name_generator_make_random(name, max_name_size);
}
}

void name_generator_make_random_prefixed(
char* name,
size_t max_name_size,
Expand Down
3 changes: 3 additions & 0 deletions lib/toolbox/name_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ void name_generator_make_auto_datetime(
const char* prefix,
DateTime* custom_time);

// Generate name without prefix in random names
void name_generator_make_auto_basic(char* name, size_t max_name_size, const char* prefix);

/** Generates random name
*
* @param name buffer to write random name
Expand Down
1 change: 1 addition & 0 deletions targets/f7/api_symbols.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2708,6 +2708,7 @@ Function,-,music_worker_set_volume,void,"MusicWorker*, float"
Function,-,music_worker_start,void,MusicWorker*
Function,-,music_worker_stop,void,MusicWorker*
Function,+,name_generator_make_auto,void,"char*, size_t, const char*"
Function,+,name_generator_make_auto_basic,void,"char*, size_t, const char*"
Function,+,name_generator_make_auto_datetime,void,"char*, size_t, const char*, DateTime*"
Function,+,name_generator_make_detailed,void,"char*, size_t, const char*"
Function,+,name_generator_make_detailed_datetime,void,"char*, size_t, const char*, DateTime*, _Bool"
Expand Down

0 comments on commit edba596

Please sign in to comment.