Skip to content

Commit ddef3d2

Browse files
committed
upd blespam
1 parent 999dc95 commit ddef3d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

base_pack/ble_spam/ble_spam.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,14 @@ const NotificationSequence blink_sequence = {
186186
NULL,
187187
};
188188
static void start_blink(State* state) {
189+
if(!state->ctx.led_indicator) return;
189190
uint16_t period = delays[state->delay];
190191
if(period <= 100) period += 30;
191192
blink_message.data.led_blink.period = period;
192193
notification_message_block(state->ctx.notification, &blink_sequence);
193194
}
194195
static void stop_blink(State* state) {
196+
if(!state->ctx.led_indicator) return;
195197
notification_message_block(state->ctx.notification, &sequence_blink_stop);
196198
}
197199

@@ -228,7 +230,7 @@ static int32_t adv_thread(void* _ctx) {
228230
Payload* payload = &attacks[state->index].payload;
229231
const Protocol* protocol = attacks[state->index].protocol;
230232
if(!payload->random_mac) randomize_mac(state);
231-
if(state->ctx.led_indicator) start_blink(state);
233+
start_blink(state);
232234
if(furi_hal_bt_extra_beacon_is_active()) {
233235
furi_check(furi_hal_bt_extra_beacon_stop());
234236
}
@@ -247,7 +249,7 @@ static int32_t adv_thread(void* _ctx) {
247249
furi_check(furi_hal_bt_extra_beacon_stop());
248250
}
249251

250-
if(state->ctx.led_indicator) stop_blink(state);
252+
stop_blink(state);
251253
return 0;
252254
}
253255

0 commit comments

Comments
 (0)