PortaPack: Define draw-dB function earier so it can be used for LNA.
This commit is contained in:
@ -855,6 +855,12 @@ typedef enum {
|
|||||||
|
|
||||||
static const uint8_t VALUES_X = 72;
|
static const uint8_t VALUES_X = 72;
|
||||||
|
|
||||||
|
static ui_point_t portapack_ui_draw_db(ui_point_t point, const uint32_t db) {
|
||||||
|
point = portapack_lcd_draw_string(point, "+");
|
||||||
|
point = portapack_lcd_draw_int(point, db, 2);
|
||||||
|
return portapack_lcd_draw_string(point, "dB");
|
||||||
|
}
|
||||||
|
|
||||||
static void portapack_draw_radio_path(
|
static void portapack_draw_radio_path(
|
||||||
const draw_list_t* const draw_list,
|
const draw_list_t* const draw_list,
|
||||||
const size_t count
|
const size_t count
|
||||||
@ -948,12 +954,6 @@ static void portapack_ui_set_lna_power(bool lna_on) {
|
|||||||
portapack_radio_path_redraw();
|
portapack_radio_path_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
static ui_point_t portapack_ui_draw_db(ui_point_t point, const uint32_t db) {
|
|
||||||
point = portapack_lcd_draw_string(point, "+");
|
|
||||||
point = portapack_lcd_draw_int(point, db, 2);
|
|
||||||
return portapack_lcd_draw_string(point, "dB");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void portapack_ui_set_bb_lna_gain(const uint32_t gain_db) {
|
static void portapack_ui_set_bb_lna_gain(const uint32_t gain_db) {
|
||||||
ui_point_t point = { VALUES_X, radio_draw_list[RADIO_DRAW_LIST_ITEM_BB_LNA_AMP].point.y + 4 };
|
ui_point_t point = { VALUES_X, radio_draw_list[RADIO_DRAW_LIST_ITEM_BB_LNA_AMP].point.y + 4 };
|
||||||
portapack_ui_draw_db(point, gain_db);
|
portapack_ui_draw_db(point, gain_db);
|
||||||
|
Reference in New Issue
Block a user