3 Replies Latest reply on Nov 13, 2019 9:40 AM by LePo_1062026

    Found issue with RTC_Basics example project

    LePo_1062026

      To all,

       

      I found an issue with the RTC_Basics example project.  My Terminal program sends a carriage-return ('\r') and not the line-feed ('\n') expected by the program.  Therefore the set_new_time() function did not work for me.

       

      I've made the following changes to main.c to address this issue and added a few more tweeks (All other code pieces are unchanged).  Here's a list of the tweeks:

      • Added conditional check for '\r' in addition to the '\n' in set_new_time().
      • I changed the prompt line in set_new_time() to have the "HH MM SS dd mm yyyy" format be on a separate line.  This allows the user to match up the typed in characters directly under the format prompt.
      • I now echo the typed characters in set_new_time().  Previously, you entered the characters without knowing if a character was typed in correctly.
      • Added a automatic read of the RTC date_time every minute if not command processing.

      Attached is the new main.c,  Replace the old one.  See if you like it.

       

      Question:  Is there an official way to submit these changes for later inclusion in the example files?

       

      Len