mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-24 05:34:45 -07:00
upd
This commit is contained in:
@@ -79,7 +79,7 @@ void* subghz_protocol_encoder_came_atomo_alloc(SubGhzEnvironment* environment) {
|
||||
instance->generic.protocol_name = instance->base.protocol->name;
|
||||
|
||||
instance->encoder.repeat = 10;
|
||||
instance->encoder.size_upload = 1024; //approx max buffer size
|
||||
instance->encoder.size_upload = 4096; //approx max buffer size
|
||||
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
|
||||
instance->encoder.is_running = false;
|
||||
return instance;
|
||||
|
||||
@@ -142,7 +142,8 @@ void subghz_protocol_decoder_kia_feed(void* context, bool level, uint32_t durati
|
||||
case KIADecoderStepSaveDuration:
|
||||
if(level) {
|
||||
if(duration >=
|
||||
(uint32_t)(subghz_protocol_kia_const.te_long + subghz_protocol_kia_const.te_delta * 2)) {
|
||||
(uint32_t)(
|
||||
subghz_protocol_kia_const.te_long + subghz_protocol_kia_const.te_delta * 2)) {
|
||||
//Found stop bit
|
||||
instance->decoder.parser_step = KIADecoderStepReset;
|
||||
if(instance->decoder.decode_count_bit ==
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#define SUBGHZ_DOWNLOAD_MAX_SIZE 512
|
||||
#define SUBGHZ_AUTO_DETECT_DOWNLOAD_MAX_SIZE 2048
|
||||
#define SUBGHZ_AUTO_DETECT_RAW_THRESHOLD -72.0f
|
||||
#define SUBGHZ_AUTO_DETECT_RAW_POSTROLL_FRAMES 40
|
||||
#define SUBGHZ_AUTO_DETECT_RAW_POSTROLL_FRAMES 30
|
||||
|
||||
static const SubGhzBlockConst subghz_protocol_raw_const = {
|
||||
.te_short = 50,
|
||||
@@ -213,7 +213,7 @@ void subghz_protocol_decoder_raw_set_rssi_threshold(void* context, int rssi_thre
|
||||
furi_assert(context);
|
||||
SubGhzProtocolDecoderRAW* instance = context;
|
||||
|
||||
FURI_LOG_D(TAG, "RSSI set: (%d)", rssi_threshold);
|
||||
FURI_LOG_E(TAG, "RSSI set: (%d)", rssi_threshold);
|
||||
|
||||
instance->rssi_threshold = rssi_threshold;
|
||||
|
||||
|
||||
@@ -136,6 +136,12 @@ void* subghz_protocol_encoder_raw_alloc(SubGhzEnvironment* environment);
|
||||
*/
|
||||
void subghz_protocol_encoder_raw_free(void* context);
|
||||
|
||||
/**
|
||||
* Сallback on completion of file transfer.
|
||||
* @param context Pointer to a SubGhzProtocolEncoderRAW instance
|
||||
*/
|
||||
void subghz_protocol_raw_file_encoder_worker_callback_end(void* context);
|
||||
|
||||
/**
|
||||
* Forced transmission stop.
|
||||
* @param context Pointer to a SubGhzProtocolEncoderRAW instance
|
||||
|
||||
@@ -237,7 +237,7 @@ bool subghz_tx_rx_worker_start(SubGhzTxRxWorker* instance, uint32_t frequency) {
|
||||
|
||||
instance->worker_running = true;
|
||||
|
||||
if(furi_hal_subghz_is_tx_allowed(frequency)) {
|
||||
if(furi_hal_region_is_frequency_allowed(frequency)) {
|
||||
instance->frequency = frequency;
|
||||
res = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user