Skip to content

Commit

Permalink
Move all related to RTC setting to CONFIG->DATE\TIME submenu
Browse files Browse the repository at this point in the history
Move Enter to DFU menu to Expert settings
  • Loading branch information
DiSlord committed Apr 8, 2024
1 parent e623734 commit 45ab02a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void rtc_set_time(uint32_t dr, uint32_t tr);
#define rtc_clock_output_toggle() RTC->CR^= RTC_CR_COE
// Check RTC clock output
#define rtc_clock_output_enabled() (RTC->CR & RTC_CR_COE)
// Set RTC calibration value in ppm (value rounded by (1<<20)/1e6
// Set RTC calibration value in ppm (value rounded by 1e6/(1<<20)
void rtc_set_cal(float ppm);
// Get RTC calibration value in ppm
float rtc_get_cal(void);
Expand Down
22 changes: 11 additions & 11 deletions ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -2305,9 +2305,11 @@ static UI_FUNCTION_ADV_CALLBACK(menu_rtc_out_acb)
rtc_clock_output_toggle();
}

const menuitem_t menu_rtc_cal[] = {
{ MT_ADV_CALLBACK, KM_RTC_CAL, "RTC CAL\n" R_LINK_COLOR "%+b.4f" S_PPM, menu_keyboard_acb },
{ MT_ADV_CALLBACK, 0, "RTC OUT\n%s" , menu_rtc_out_acb },
const menuitem_t menu_rtc[] = {
{ MT_ADV_CALLBACK, KM_RTC_DATE, "SET DATE", menu_keyboard_acb },
{ MT_ADV_CALLBACK, KM_RTC_TIME, "SET TIME", menu_keyboard_acb },
{ MT_ADV_CALLBACK, KM_RTC_CAL, "RTC CAL\n " R_LINK_COLOR "%+b.3f" S_PPM, menu_keyboard_acb },
{ MT_ADV_CALLBACK, 0, "RTC 512" S_Hz "\n Led2 %s", menu_rtc_out_acb },
{ MT_NEXT, 0, NULL, menu_back } // next-> menu_back
};
#endif
Expand All @@ -2323,12 +2325,10 @@ const menuitem_t menu_device[] = {
{ MT_ADV_CALLBACK, VNA_MODE_BACKUP,"REMEMBER\nSTATE", menu_vna_mode_acb},
#endif
#ifdef __FLIP_DISPLAY__
{ MT_ADV_CALLBACK, VNA_MODE_FLIP_DISPLAY, "FLIP\nDISPLAY", menu_vna_mode_acb },
{ MT_ADV_CALLBACK, VNA_MODE_FLIP_DISPLAY, "FLIP\nDISPLAY", menu_vna_mode_acb},
#endif
#ifdef __USE_RTC__
{ MT_ADV_CALLBACK, KM_RTC_DATE, "SET DATE", menu_keyboard_acb },
{ MT_ADV_CALLBACK, KM_RTC_TIME, "SET TIME", menu_keyboard_acb },
{ MT_SUBMENU, 0, S_RARROW" RTC CAL", menu_rtc_cal },
#ifdef __DFU_SOFTWARE_MODE__
{ MT_SUBMENU, 0, S_RARROW "DFU", menu_dfu },
#endif
{ MT_SUBMENU, 0, S_RARROW" MORE", menu_device1 },
{ MT_NEXT, 0, NULL, menu_back } // next-> menu_back
Expand All @@ -2346,8 +2346,8 @@ const menuitem_t menu_config[] = {
#ifdef __LCD_BRIGHTNESS__
{ MT_ADV_CALLBACK, 0, "BRIGHTNESS\n " R_LINK_COLOR "%d%%%%", menu_brightness_acb },
#endif
#ifdef __DFU_SOFTWARE_MODE__
{ MT_SUBMENU, 0, S_RARROW "DFU", menu_dfu },
#ifdef __USE_RTC__
{ MT_SUBMENU, 0, "DATE/TIME", menu_rtc },
#endif
{ MT_NEXT, 0, NULL, menu_back } // next-> menu_back
};
Expand Down Expand Up @@ -2919,7 +2919,7 @@ const keypads_list keypads_mode_tbl[KM_NONE] = {
#ifdef __USE_RTC__
[KM_RTC_DATE] = {KEYPAD_UFLOAT, KM_RTC_DATE, "SET DATE\nYY MM DD", input_date_time}, // Date
[KM_RTC_TIME] = {KEYPAD_UFLOAT, KM_RTC_TIME, "SET TIME\nHH MM SS", input_date_time}, // Time
[KM_RTC_CAL] = {KEYPAD_FLOAT, 0, "RTC CAL", input_rtc_cal}, // RTC calibration in ppm
[KM_RTC_CAL] = {KEYPAD_FLOAT, 0, "RTC CAL", input_rtc_cal }, // RTC calibration in ppm
#endif
#ifdef __USE_SD_CARD__
[KM_S1P_NAME] = {KEYPAD_TEXT, FMT_S1P_FILE, "S1P", input_filename }, // s1p filename
Expand Down

0 comments on commit 45ab02a

Please sign in to comment.