diff --git a/applications/plugins/signal_generator/scenes/signal_gen_scene_mco.c b/applications/plugins/signal_generator/scenes/signal_gen_scene_mco.c index 632b08c75e..0855cde0a0 100644 --- a/applications/plugins/signal_generator/scenes/signal_gen_scene_mco.c +++ b/applications/plugins/signal_generator/scenes/signal_gen_scene_mco.c @@ -1,12 +1,17 @@ #include "../signal_gen_app_i.h" typedef enum { + LineIndexPin, LineIndexSource, LineIndexDivision, } LineIndex; +static const char* const mco_pin_names[] = { + "13(Tx)", +}; + static const char* const mco_source_names[] = { - "32768", + "32768Hz", "64MHz", "~100K", "~200K", @@ -81,14 +86,22 @@ void signal_gen_scene_mco_on_enter(void* context) { VariableItem* item; + item = variable_item_list_add(var_item_list, "GPIO Pin", COUNT_OF(mco_pin_names), NULL, NULL); + variable_item_set_current_value_index(item, 0); + variable_item_set_current_value_text(item, mco_pin_names[0]); + item = variable_item_list_add( - var_item_list, "Source", COUNT_OF(mco_source_names), mco_source_list_change_callback, app); + var_item_list, + "Frequency", + COUNT_OF(mco_source_names), + mco_source_list_change_callback, + app); variable_item_set_current_value_index(item, 0); variable_item_set_current_value_text(item, mco_source_names[0]); item = variable_item_list_add( var_item_list, - "Division", + "Freq. divider", COUNT_OF(mco_divisor_names), mco_divisor_list_change_callback, app); diff --git a/applications/plugins/signal_generator/scenes/signal_gen_scene_start.c b/applications/plugins/signal_generator/scenes/signal_gen_scene_start.c index 91f6081d84..3c7b9cc32a 100644 --- a/applications/plugins/signal_generator/scenes/signal_gen_scene_start.c +++ b/applications/plugins/signal_generator/scenes/signal_gen_scene_start.c @@ -16,10 +16,10 @@ void signal_gen_scene_start_on_enter(void* context) { Submenu* submenu = app->submenu; submenu_add_item( - submenu, "PWM", SubmenuIndexPwm, signal_gen_scene_start_submenu_callback, app); + submenu, "PWM Generator", SubmenuIndexPwm, signal_gen_scene_start_submenu_callback, app); submenu_add_item( submenu, - "Clock Output", + "Clock Generator", SubmenuIndexClockOutput, signal_gen_scene_start_submenu_callback, app); diff --git a/applications/plugins/signal_generator/views/signal_gen_pwm.c b/applications/plugins/signal_generator/views/signal_gen_pwm.c index 00b4ef2674..9f263be3ce 100644 --- a/applications/plugins/signal_generator/views/signal_gen_pwm.c +++ b/applications/plugins/signal_generator/views/signal_gen_pwm.c @@ -9,7 +9,7 @@ typedef enum { LineIndexTotalCount } LineIndex; -static const char* const pwm_ch_names[] = {"TIM1(2)", "LPTIM2(4)"}; +static const char* const pwm_ch_names[] = {"2(A7)", "4(A4)"}; struct SignalGenPwm { View* view; @@ -31,8 +31,8 @@ typedef struct { #define ITEM_H 64 / 3 #define ITEM_W 128 -#define VALUE_X 95 -#define VALUE_W 55 +#define VALUE_X 100 +#define VALUE_W 45 #define FREQ_VALUE_X 62 #define FREQ_MAX 1000000UL @@ -126,11 +126,11 @@ static void signal_gen_pwm_draw_callback(Canvas* canvas, void* _model) { for(uint8_t line = 0; line < LineIndexTotalCount; line++) { if(line == LineIndexChannel) { - line_label = "PWM Channel"; + line_label = "GPIO Pin"; } else if(line == LineIndexFrequency) { line_label = "Frequency"; } else if(line == LineIndexDuty) { - line_label = "Duty Cycle"; + line_label = "Pulse width"; } canvas_set_color(canvas, ColorBlack); @@ -162,9 +162,9 @@ static void signal_gen_pwm_draw_callback(Canvas* canvas, void* _model) { canvas_set_font(canvas, FontSecondary); if(model->edit_mode) { - uint8_t icon_x = (FREQ_VALUE_X - 1) + (FREQ_DIGITS_NB - model->edit_digit - 1) * 6; + uint8_t icon_x = (FREQ_VALUE_X) + (FREQ_DIGITS_NB - model->edit_digit - 1) * 6; canvas_draw_icon(canvas, icon_x, text_y - 9, &I_SmallArrowUp_4x7); - canvas_draw_icon(canvas, icon_x, text_y + 4, &I_SmallArrowDown_4x7); + canvas_draw_icon(canvas, icon_x, text_y + 5, &I_SmallArrowDown_4x7); } } else if(line == LineIndexDuty) { snprintf(val_text, sizeof(val_text), "%d%%", model->duty); diff --git a/assets/icons/Interface/SmallArrowDown_4x7.png b/assets/icons/Interface/SmallArrowDown_4x7.png index 5c5252b167..1912e5d246 100644 Binary files a/assets/icons/Interface/SmallArrowDown_4x7.png and b/assets/icons/Interface/SmallArrowDown_4x7.png differ diff --git a/assets/icons/Interface/SmallArrowUp_4x7.png b/assets/icons/Interface/SmallArrowUp_4x7.png index 886369abc6..9c6242078d 100644 Binary files a/assets/icons/Interface/SmallArrowUp_4x7.png and b/assets/icons/Interface/SmallArrowUp_4x7.png differ