mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 21:13:16 +00:00
fix first send signal equals last transferred or 0x00
This commit is contained in:
parent
add1ad6949
commit
08084d5763
1 changed files with 4 additions and 3 deletions
|
@ -55,6 +55,7 @@ bool subbrute_scene_setup_attack_on_event(void* context, SceneManagerEvent event
|
|||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubBruteCustomEventTypeTransmitStarted) {
|
||||
subbrute_device_create_packet_parsed(instance->device, instance->device->key_index);
|
||||
scene_manager_next_scene(instance->scene_manager, SubBruteSceneRunAttack);
|
||||
} else if(event.event == SubBruteCustomEventTypeSaveFile) {
|
||||
subbrute_worker_manual_transmit_stop(instance->worker);
|
||||
|
@ -81,7 +82,7 @@ bool subbrute_scene_setup_attack_on_event(void* context, SceneManagerEvent event
|
|||
scene_manager_next_scene(instance->scene_manager, SubBruteSceneStart);
|
||||
} else if(event.event == SubBruteCustomEventTypeChangeStepUp) {
|
||||
// +1
|
||||
if ((instance->device->key_index + 1) - instance->device->max_value == 1) {
|
||||
if((instance->device->key_index + 1) - instance->device->max_value == 1) {
|
||||
instance->device->key_index = 0x00;
|
||||
} else {
|
||||
uint64_t value = instance->device->key_index + 1;
|
||||
|
@ -103,9 +104,9 @@ bool subbrute_scene_setup_attack_on_event(void* context, SceneManagerEvent event
|
|||
subbrute_attack_view_set_current_step(view, instance->device->key_index);
|
||||
} else if(event.event == SubBruteCustomEventTypeChangeStepDown) {
|
||||
// -1
|
||||
if (instance->device->key_index - 1 == 0) {
|
||||
if(instance->device->key_index - 1 == 0) {
|
||||
instance->device->key_index = 0x00;
|
||||
} else if (instance->device->key_index == 0) {
|
||||
} else if(instance->device->key_index == 0) {
|
||||
instance->device->key_index = instance->device->max_value;
|
||||
} else {
|
||||
uint64_t value = ((instance->device->key_index - 1) + instance->device->max_value);
|
||||
|
|
Loading…
Reference in a new issue