AppWizard not updating text

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • AppWizard not updating text

      Source Code

      1. char rtc[24];
      2. snprintf(rtc, 24, "%04d-%02d-%02d %02d:%02d:%02d", //
      3. api::TimeKeeping::now.year, //
      4. api::TimeKeeping::now.month, //
      5. api::TimeKeeping::now.day, //
      6. api::TimeKeeping::now.hour, //
      7. api::TimeKeeping::now.minute, //
      8. api::TimeKeeping::now.second); //
      9. APPW_SetText(ID_IDLE_SCREEN, ID_TEXT_RTC, "");
      10. APPW_SetText(ID_IDLE_SCREEN, ID_TEXT_RTC, rtc);
      Display All
      I am using the code above to change the value of a text (holding the current date/time). However, without line 12 it doesn't work.
      I have traced this down into the sources, and it is because the pointer of the string does not change. between two runs of the code above, it does not get updated. I think this is incorrect, there should be a contents comparison or no comparison at all.

      Unless, ofcourse, I am missing something here.
    • Hi Marcel,

      When setting a text to an object make sure to not set a text within the AppWizard.

      If a text is set from within the AppWizard it will overwrite the text set programmatically.

      Currently the AppWizard shows the object type as a hint to distinguish between the different objects (especially the text object which would be invisible without a text set). We will further improve this by showing not only the object type but also the object ID.

      Best regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.