mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-17 04:34:44 -07:00
fix PNG, move waves 2px down and code to correct values
This commit is contained in:
@@ -33,16 +33,7 @@ static void subghz_scene_receiver_update_statusbar(void* context) {
|
|||||||
frequency_str = furi_string_alloc();
|
frequency_str = furi_string_alloc();
|
||||||
modulation_str = furi_string_alloc();
|
modulation_str = furi_string_alloc();
|
||||||
|
|
||||||
#ifdef SUBGHZ_EXT_PRESET_NAME
|
|
||||||
if(subghz_history_get_last_index(subghz->txrx->history)> 0) {
|
|
||||||
subghz_get_frequency_modulation(subghz, frequency_str, modulation_str);
|
|
||||||
} else {
|
|
||||||
subghz_get_frequency_modulation(subghz, frequency_str, NULL);
|
|
||||||
furi_string_printf(modulation_str, "%s", furi_string_get_cstr(subghz->txrx->preset->name));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
subghz_get_frequency_modulation(subghz, frequency_str, modulation_str);
|
subghz_get_frequency_modulation(subghz, frequency_str, modulation_str);
|
||||||
#endif
|
|
||||||
|
|
||||||
subghz_view_receiver_add_data_statusbar(
|
subghz_view_receiver_add_data_statusbar(
|
||||||
subghz->subghz_receiver,
|
subghz->subghz_receiver,
|
||||||
|
|||||||
@@ -42,7 +42,12 @@ static void subghz_scene_read_raw_update_statusbar(void* context) {
|
|||||||
frequency_str = furi_string_alloc();
|
frequency_str = furi_string_alloc();
|
||||||
modulation_str = furi_string_alloc();
|
modulation_str = furi_string_alloc();
|
||||||
|
|
||||||
|
#ifdef SUBGHZ_EXT_PRESET_NAME
|
||||||
|
subghz_get_frequency_modulation(subghz, frequency_str, NULL);
|
||||||
|
furi_string_printf(modulation_str, "%s", furi_string_get_cstr(subghz->txrx->preset->name));
|
||||||
|
#else
|
||||||
subghz_get_frequency_modulation(subghz, frequency_str, modulation_str);
|
subghz_get_frequency_modulation(subghz, frequency_str, modulation_str);
|
||||||
|
#endif
|
||||||
subghz_read_raw_add_data_statusbar(
|
subghz_read_raw_add_data_statusbar(
|
||||||
subghz->subghz_read_raw,
|
subghz->subghz_read_raw,
|
||||||
furi_string_get_cstr(frequency_str),
|
furi_string_get_cstr(frequency_str),
|
||||||
|
|||||||
@@ -270,12 +270,12 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
|
|||||||
#ifdef SUBGHZ_EXT_PRESET_NAME
|
#ifdef SUBGHZ_EXT_PRESET_NAME
|
||||||
if(model->history_item == 0 && model->mode == SubGhzViewReceiverModeLive) {
|
if(model->history_item == 0 && model->mode == SubGhzViewReceiverModeLive) {
|
||||||
const char* str = furi_string_get_cstr(model->preset_str);
|
const char* str = furi_string_get_cstr(model->preset_str);
|
||||||
const uint8_t vertical_offset = 3;
|
const uint8_t vertical_offset = 7;
|
||||||
const uint8_t horizontal_offset = 3;
|
const uint8_t horizontal_offset = 3;
|
||||||
const uint8_t string_width = canvas_string_width(canvas, str);
|
const uint8_t string_width = canvas_string_width(canvas, str);
|
||||||
canvas_draw_str(
|
canvas_draw_str(
|
||||||
canvas,
|
canvas,
|
||||||
canvas_width(canvas) - string_width + horizontal_offset,
|
canvas_width(canvas) - (string_width + horizontal_offset),
|
||||||
vertical_offset,
|
vertical_offset,
|
||||||
str);
|
str);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user