🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Typo in RTC methods getDate and setDate

    Arduino
    1
    1
    2.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wsanders
      last edited by wsanders

      When I try to compile the RTC example, in the M5StickC-Plus examples on github (https://github.com/m5stack/M5StickC-Plus/blob/f4f2ef8c3619fed4c430ce6e1f486c5c63f7c09e/examples/Basics/RTC/RTC.ino) I get:

      RTCTest:38:12: error: 'class RTC' has no member named 'SetDate'; did you mean 'SetData'?
      RTCTest:49:12: error: 'class RTC' has no member named 'GetDate'; did you mean 'GetData'?

      Looks like the method is misspelled in

      class RTC {
      public:
      RTC();
      ...
      void SetData(RTC_DateTypeDef* RTC_DateStruct);
      void GetData(RTC_DateTypeDef* RTC_DateStruct); //oops!

      This typo isn't in the github repo, "Latest commit f4f2ef8 on Oct 1, 2022", but it hasn't been pushed to the IDE v0.0.8 M5StickCPlus library, which is the latest available for Arduno IDE 1.x.

      Feature Request: I would be nice is the RTC methods used standard C++ struct tm, you wouldn't have to mess with swapping the struct members around when you get a standard struct tm back from the NTP library. Maybe I'll make some functions to convert the data types and post them on github.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post