mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 02:28:36 -07:00
change: add defines to disable load saved preset value and binary RAW
add: icon for BinRAW mode in Read screen
This commit is contained in:
@@ -63,6 +63,7 @@ typedef struct {
|
||||
FuriString* history_stat_str;
|
||||
FuriString* progress_str;
|
||||
bool hopping_enabled;
|
||||
bool bin_raw_enabled;
|
||||
SubGhzReceiverHistory* history;
|
||||
uint16_t idx;
|
||||
uint16_t list_offset;
|
||||
@@ -202,7 +203,8 @@ void subghz_view_receiver_add_data_statusbar(
|
||||
const char* frequency_str,
|
||||
const char* preset_str,
|
||||
const char* history_stat_str,
|
||||
bool hopping_enabled) {
|
||||
bool hopping_enabled,
|
||||
bool bin_raw_enabled) {
|
||||
furi_assert(subghz_receiver);
|
||||
with_view_model(
|
||||
subghz_receiver->view,
|
||||
@@ -212,6 +214,7 @@ void subghz_view_receiver_add_data_statusbar(
|
||||
furi_string_set(model->preset_str, preset_str);
|
||||
furi_string_set(model->history_stat_str, history_stat_str);
|
||||
model->hopping_enabled = hopping_enabled;
|
||||
model->bin_raw_enabled = bin_raw_enabled;
|
||||
},
|
||||
true);
|
||||
}
|
||||
@@ -330,11 +333,11 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
|
||||
//canvas_draw_line(canvas, 46, 51, 125, 51);
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
|
||||
// if(model->hopping_enabled) {
|
||||
// const uint8_t vertical_offset = 0;
|
||||
// const uint8_t horizontal_offset = 3;
|
||||
// canvas_draw_icon(canvas, horizontal_offset, vertical_offset, &I_Dynamic_9x7);
|
||||
// }
|
||||
if(model->bin_raw_enabled) {
|
||||
const uint8_t vertical_offset = 17;
|
||||
const uint8_t horizontal_offset = 118;
|
||||
canvas_draw_icon(canvas, horizontal_offset, vertical_offset, &I_Raw_9x7);
|
||||
}
|
||||
} else {
|
||||
canvas_draw_icon(
|
||||
canvas,
|
||||
@@ -564,6 +567,7 @@ void subghz_view_receiver_exit(void* context) {
|
||||
model->history_item = 0;
|
||||
model->nodraw = false;
|
||||
model->hopping_enabled = false;
|
||||
model->bin_raw_enabled = false;
|
||||
},
|
||||
false);
|
||||
furi_timer_stop(subghz_receiver->timer);
|
||||
@@ -601,6 +605,7 @@ SubGhzViewReceiver* subghz_view_receiver_alloc() {
|
||||
model->nodraw = false;
|
||||
model->history = malloc(sizeof(SubGhzReceiverHistory));
|
||||
model->hopping_enabled = false;
|
||||
model->bin_raw_enabled = false;
|
||||
SubGhzReceiverMenuItemArray_init(model->history->data);
|
||||
},
|
||||
true);
|
||||
|
||||
Reference in New Issue
Block a user