Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RV3028 *rtc is NULL, and some warnings #3

Open
martinwork opened this issue Oct 10, 2022 · 0 comments · May be fixed by microsoft/pxt-microbit#4867
Open

RV3028 *rtc is NULL, and some warnings #3

martinwork opened this issue Oct 10, 2022 · 0 comments · May be fixed by microsoft/pxt-microbit#4867

Comments

@martinwork
Copy link

RV3028 *rtc is NULL
https://github.com/sparkfun/pxt-gator-rtc/blob/master/gatorRTC.cpp#L12
A quick fix is this RV3028 theRTC; RV3028 *rtc = &theRTC;, but it might be better allocated in an init function

In the Chrome F12 Console, there is a warning about the setTime function.
/home/build/prj2/source/gatorRTC/SparkFun_RV3028.cpp: In member function 'bool RV3028::setTime(uint8_t*, uint8_t)': /home/build/prj2/source/gatorRTC/SparkFun_RV3028.cpp:111:1: warning: control reaches end of non-void function [-Wreturn-type] }
This is easily fixed by returning true.

There are a series of warnings about using mbed with CODAL
https://support.microbit.org/en/support/solutions/articles/19000054952-makecode-extension-and-tutorial-approval
"The exenstion does not make use of mBed and uses CODAL/DAL"
As far a I could see mbed was only included to get the definitions for uint8_t etc, so I think it's safe to replace it with an include of cstdint, which in also included in gatorRTC.cpp.

See
https://github.com/martinwork/pxt-gator-rtc/commits/suggestions

@martinwork martinwork linked a pull request Oct 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant