mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Merge branch 'fz-dev' into dev
This commit is contained in:
@@ -43,6 +43,7 @@ struct SubGhzProtocolDecoderRAW {
|
||||
bool has_rssi_above_threshold;
|
||||
int rssi_threshold;
|
||||
uint8_t postroll_frames;
|
||||
bool pause;
|
||||
};
|
||||
|
||||
struct SubGhzProtocolEncoderRAW {
|
||||
@@ -169,6 +170,7 @@ bool subghz_protocol_raw_save_to_file_init(
|
||||
instance->upload_raw = malloc(SUBGHZ_DOWNLOAD_MAX_SIZE * sizeof(int32_t));
|
||||
instance->file_is_open = RAWFileIsOpenWrite;
|
||||
instance->sample_write = 0;
|
||||
instance->pause = false;
|
||||
init = true;
|
||||
} while(0);
|
||||
|
||||
@@ -240,6 +242,14 @@ void subghz_protocol_decoder_raw_set_auto_mode(void* context, bool auto_mode) {
|
||||
subghz_protocol_decoder_raw_reset(context);
|
||||
}
|
||||
|
||||
void subghz_protocol_raw_save_to_file_pause(SubGhzProtocolDecoderRAW* instance, bool pause) {
|
||||
furi_assert(instance);
|
||||
|
||||
if(instance->pause != pause) {
|
||||
instance->pause = pause;
|
||||
}
|
||||
}
|
||||
|
||||
size_t subghz_protocol_raw_get_sample_write(SubGhzProtocolDecoderRAW* instance) {
|
||||
return instance->sample_write + instance->ind_write;
|
||||
}
|
||||
@@ -306,7 +316,8 @@ void subghz_protocol_decoder_raw_feed(void* context, bool level, uint32_t durati
|
||||
furi_assert(context);
|
||||
SubGhzProtocolDecoderRAW* instance = context;
|
||||
|
||||
if(instance->upload_raw != NULL && duration > subghz_protocol_raw_const.te_short) {
|
||||
if(instance->upload_raw != NULL && !instance->pause &&
|
||||
duration > subghz_protocol_raw_const.te_short) {
|
||||
if(instance->auto_mode) {
|
||||
float rssi = furi_hal_subghz_get_rssi();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user