mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 23:28:36 -07:00
Fix subghz merge
This commit is contained in:
@@ -59,6 +59,14 @@ void subghz_read_raw_add_data_statusbar(
|
||||
true);
|
||||
}
|
||||
|
||||
void subghz_read_raw_set_radio_device_type(
|
||||
SubGhzReadRAW* instance,
|
||||
SubGhzRadioDeviceType device_type) {
|
||||
furi_assert(instance);
|
||||
with_view_model(
|
||||
instance->view, SubGhzReadRAWModel * model, { model->device_type = device_type; }, true);
|
||||
}
|
||||
|
||||
void subghz_read_raw_add_data_rssi(SubGhzReadRAW* instance, float rssi, bool trace) {
|
||||
furi_assert(instance);
|
||||
uint8_t u_rssi = 0;
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <gui/view.h>
|
||||
#include "../helpers/subghz_types.h"
|
||||
#include "../helpers/subghz_custom_event.h"
|
||||
|
||||
#define SUBGHZ_RAW_THRESHOLD_MIN -90.0f
|
||||
|
||||
typedef void (*SubGhzReadRAWCallback)(SubGhzCustomEvent event, void* context);
|
||||
typedef struct SubGhzReadRAW SubGhzReadRAW;
|
||||
|
||||
typedef struct {
|
||||
View* view;
|
||||
SubGhzReadRAWCallback callback;
|
||||
void* context;
|
||||
} SubGhzReadRAW;
|
||||
typedef void (*SubGhzReadRAWCallback)(SubGhzCustomEvent event, void* context);
|
||||
|
||||
typedef enum {
|
||||
SubGhzReadRAWStatusStart,
|
||||
@@ -26,22 +23,6 @@ typedef enum {
|
||||
SubGhzReadRAWStatusSaveKey,
|
||||
} SubGhzReadRAWStatus;
|
||||
|
||||
typedef struct {
|
||||
FuriString* frequency_str;
|
||||
FuriString* preset_str;
|
||||
FuriString* sample_write;
|
||||
FuriString* file_name;
|
||||
uint8_t* rssi_history;
|
||||
uint8_t rssi_current;
|
||||
bool rssi_history_end;
|
||||
uint8_t ind_write;
|
||||
uint8_t ind_sin;
|
||||
SubGhzReadRAWStatus status;
|
||||
bool raw_send_only;
|
||||
float raw_threshold_rssi;
|
||||
bool not_showing_samples;
|
||||
} SubGhzReadRAWModel;
|
||||
|
||||
void subghz_read_raw_set_callback(
|
||||
SubGhzReadRAW* subghz_read_raw,
|
||||
SubGhzReadRAWCallback callback,
|
||||
@@ -56,6 +37,10 @@ void subghz_read_raw_add_data_statusbar(
|
||||
const char* frequency_str,
|
||||
const char* preset_str);
|
||||
|
||||
void subghz_read_raw_set_radio_device_type(
|
||||
SubGhzReadRAW* instance,
|
||||
SubGhzRadioDeviceType device_type);
|
||||
|
||||
void subghz_read_raw_update_sample_write(SubGhzReadRAW* instance, size_t sample);
|
||||
|
||||
void subghz_read_raw_stop_send(SubGhzReadRAW* instance);
|
||||
|
||||
@@ -51,6 +51,17 @@ void subghz_view_transmitter_add_data_to_show(
|
||||
true);
|
||||
}
|
||||
|
||||
void subghz_view_transmitter_set_radio_device_type(
|
||||
SubGhzViewTransmitter* subghz_transmitter,
|
||||
SubGhzRadioDeviceType device_type) {
|
||||
furi_assert(subghz_transmitter);
|
||||
with_view_model(
|
||||
subghz_transmitter->view,
|
||||
SubGhzViewTransmitterModel * model,
|
||||
{ model->device_type = device_type; },
|
||||
true);
|
||||
}
|
||||
|
||||
static void subghz_view_transmitter_button_right(Canvas* canvas, const char* str) {
|
||||
const uint8_t button_height = 12;
|
||||
const uint8_t vertical_offset = 3;
|
||||
|
||||
@@ -1,30 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <gui/view.h>
|
||||
#include "../helpers/subghz_types.h"
|
||||
#include "../helpers/subghz_custom_event.h"
|
||||
|
||||
typedef struct {
|
||||
FuriString* frequency_str;
|
||||
FuriString* preset_str;
|
||||
FuriString* key_str;
|
||||
bool show_button;
|
||||
FuriString* temp_button_id;
|
||||
bool draw_temp_button;
|
||||
} SubGhzViewTransmitterModel;
|
||||
typedef struct SubGhzViewTransmitter SubGhzViewTransmitter;
|
||||
|
||||
typedef void (*SubGhzViewTransmitterCallback)(SubGhzCustomEvent event, void* context);
|
||||
|
||||
typedef struct {
|
||||
View* view;
|
||||
SubGhzViewTransmitterCallback callback;
|
||||
void* context;
|
||||
} SubGhzViewTransmitter;
|
||||
|
||||
void subghz_view_transmitter_set_callback(
|
||||
SubGhzViewTransmitter* subghz_transmitter,
|
||||
SubGhzViewTransmitterCallback callback,
|
||||
void* context);
|
||||
|
||||
void subghz_view_transmitter_set_radio_device_type(
|
||||
SubGhzViewTransmitter* subghz_transmitter,
|
||||
SubGhzRadioDeviceType device_type);
|
||||
|
||||
SubGhzViewTransmitter* subghz_view_transmitter_alloc();
|
||||
|
||||
void subghz_view_transmitter_free(SubGhzViewTransmitter* subghz_transmitter);
|
||||
|
||||
Reference in New Issue
Block a user