Skip to content

Commit

Permalink
SubGHZ Beep on TX, makes us know we are doing something!
Browse files Browse the repository at this point in the history
Also made SubGHZ remote have a Beep like the app.
Its good to have feedback when you transmit and I want the apps in line.
  • Loading branch information
LeeroysHub committed Nov 26, 2023
1 parent a42430a commit ad0a273
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@

#define TAG "SubRemScenRemote"

const NotificationSequence subghz_sequence_subremote_beep = {
&message_vibro_on,
&message_note_c6,
&message_delay_50,
&message_sound_off,
&message_vibro_off,
NULL,
};

void subrem_scene_remote_callback(SubRemCustomEvent event, void* context) {
furi_assert(context);
SubGhzRemoteApp* app = context;
Expand Down Expand Up @@ -63,6 +72,9 @@ bool subrem_scene_remote_on_event(void* context, SceneManagerEvent event) {
event.event == SubRemCustomEventViewRemoteStartLEFT ||
event.event == SubRemCustomEventViewRemoteStartRIGHT ||
event.event == SubRemCustomEventViewRemoteStartOK) {
//Beep and Vibrate so its inline with my SubGHZ app changes.
notification_message(app->notifications, &subghz_sequence_subremote_beep);

// Start sending sub
subrem_tx_stop_sub(app, true);

Expand Down
10 changes: 10 additions & 0 deletions applications/main/subghz/scenes/subghz_scene_read_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
#define RAW_FILE_NAME "R_"
#define TAG "SubGhzSceneReadRAW"

const NotificationSequence subghz_sequence_raw_beep = {
&message_vibro_on,
&message_note_c6,
&message_delay_50,
&message_sound_off,
&message_vibro_off,
NULL,
};

bool subghz_scene_read_raw_update_filename(SubGhz* subghz) {
bool ret = false;
//set the path to read the file
Expand Down Expand Up @@ -222,6 +231,7 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) {
"",
subghz_threshold_rssi_get(subghz->threshold_rssi));
} else {
notification_message(subghz->notifications, &subghz_sequence_raw_beep);
if(scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneSaved) ||
!scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneStart)) {
dolphin_deed(DolphinDeedSubGhzSend);
Expand Down
10 changes: 10 additions & 0 deletions applications/main/subghz/scenes/subghz_scene_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

#define TAG "SubGhzSceneReceiver"

const NotificationSequence subghz_sequence_beep = {
&message_vibro_on,
&message_note_c6,
&message_delay_50,
&message_sound_off,
&message_vibro_off,
NULL,
};

const NotificationSequence subghz_sequence_rx = {
&message_green_255,

Expand Down Expand Up @@ -255,6 +264,7 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
subghz_txrx_hopper_unpause(subghz->txrx);
subghz->state_notifications = SubGhzNotificationStateRx;
} else {
notification_message(subghz->notifications, &subghz_sequence_beep);
subghz->state_notifications = SubGhzNotificationStateTx;
}
consumed = true;
Expand Down
10 changes: 10 additions & 0 deletions applications/main/subghz/scenes/subghz_scene_receiver_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@

uint32_t SavedHopperState;

const NotificationSequence subghz_sequence_info_beep = {
&message_vibro_on,
&message_note_c6,
&message_delay_50,
&message_sound_off,
&message_vibro_off,
NULL,
};

void subghz_scene_receiver_info_callback(GuiButtonType result, InputType type, void* context) {
furi_assert(context);
SubGhz* subghz = context;
Expand Down Expand Up @@ -147,6 +156,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
} else {
subghz->state_notifications = SubGhzNotificationStateTx;
}
notification_message(subghz->notifications, &subghz_sequence_info_beep);
return true;
} else if(event.event == SubGhzCustomEventSceneReceiverInfoTxStop) {
//CC1101 Stop Tx -> Start RX
Expand Down

0 comments on commit ad0a273

Please sign in to comment.