mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2025-02-17 13:58:32 +00:00
Adding function to detect end of altcode
This commit is contained in:
parent
16fe62e98d
commit
905273e066
1 changed files with 5 additions and 1 deletions
|
@ -210,6 +210,10 @@ static void send_hid_packet(
|
|||
furi_delay_ms(12);
|
||||
}
|
||||
|
||||
static bool ducky_end_line(const char chr) {
|
||||
return ((chr == ' ') || (chr == '\0') || (chr == '\r') || (chr == '\n'));
|
||||
}
|
||||
|
||||
// returns false if there was an error processing script line
|
||||
static bool mj_process_ducky_line(
|
||||
FuriHalSpiBusHandle* handle,
|
||||
|
@ -307,7 +311,7 @@ static bool mj_process_ducky_line(
|
|||
holding_alt = false;
|
||||
release_key(handle, addr, addr_size, rate, plugin_state);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
} else if(strncmp(line_tmp, ducky_cmd_repeat, strlen(ducky_cmd_repeat)) == 0) {
|
||||
// REPEAT
|
||||
|
|
Loading…
Add table
Reference in a new issue