fix PNG, move waves 2px down and code to correct values

This commit is contained in:
DerSkythe 2022-10-11 21:56:00 +04:00
parent 06c0adfe98
commit e78d73c35f
4 changed files with 7 additions and 11 deletions

View File

@ -33,16 +33,7 @@ static void subghz_scene_receiver_update_statusbar(void* context) {
frequency_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);
#endif
subghz_view_receiver_add_data_statusbar(
subghz->subghz_receiver,

View File

@ -42,7 +42,12 @@ static void subghz_scene_read_raw_update_statusbar(void* context) {
frequency_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);
#endif
subghz_read_raw_add_data_statusbar(
subghz->subghz_read_raw,
furi_string_get_cstr(frequency_str),

View File

@ -270,12 +270,12 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
#ifdef SUBGHZ_EXT_PRESET_NAME
if(model->history_item == 0 && model->mode == SubGhzViewReceiverModeLive) {
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 string_width = canvas_string_width(canvas, str);
canvas_draw_str(
canvas,
canvas_width(canvas) - string_width + horizontal_offset,
canvas_width(canvas) - (string_width + horizontal_offset),
vertical_offset,
str);
} else {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB