Menu for Display

Hi Oliver,
I've play very well with the new function that I've learned ... so now I was working on the display time ... I don't understood why I cannot show nothing if I arrange the menu in this way...

uint8_t dt_day_disp = RTC.get(DS1307_DATE,false);
uint8_t dt_month_disp = RTC.get(DS1307_MTH,false);
uint8_t dt_year_disp = (RTC.get(DS1307_YR,false)-2000);
uint8_t dt_min_disp = RTC.get(DS1307_MIN,false);
uint8_t dt_hour_disp = RTC.get(DS1307_HR,true);

M2_LABEL(el_dt_l1_disp, "x0y2", "ddmmyy:");
M2_U8NUM(el_dt_day_disp, "x7y2c2r1", 1,31,&dt_day_disp);
M2_U8NUM(el_dt_month_disp, "x11y2c2r1", 1,12,&dt_month_disp);
M2_U8NUM(el_dt_year_disp, "x15y2c2r1", 0,99,&dt_year_disp);

M2_LABEL(el_dt_l2_disp, "x0y1", "hhmm:");
M2_U8NUM(el_dt_hour_disp,"x7y1c2r1", 0,23,&dt_hour_disp);
M2_U8NUM(el_dt_min_disp, "x11y1c2r1", 0,59,&dt_min_disp);

M2_ROOT(el_dt_ok_disp, "x0y0", "ok", &top_el_expandable_menu);



M2_LIST(num_list_date_disp) = { &el_dt_l1_disp,&el_dt_day_disp,&el_dt_month_disp,&el_dt_year_disp,
                           &el_dt_l2_disp,&el_dt_hour_disp,&el_dt_min_disp,
                           &el_dt_ok_disp
                          };
M2_XYLIST(el_list_date_disp, NULL,num_list_date_disp);

and issues is related to this:

uint8_t dt_day_disp = RTC.get(DS1307_DATE,false);
uint8_t dt_month_disp = RTC.get(DS1307_MTH,false);
uint8_t dt_year_disp = (RTC.get(DS1307_YR,false)-2000);
uint8_t dt_min_disp = RTC.get(DS1307_MIN,false);
uint8_t dt_hour_disp = RTC.get(DS1307_HR,true);

now the question that i did to my self and that I forward to you is ... ? Ok I've set a read only field ... but how can I retrieve dynamically date / time and put it on a display ... ?

so i think to have follow your suggestion maybe correct if wrong :slight_smile:

thanks 1000,
gnux