-
Notifications
You must be signed in to change notification settings - Fork 238
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
RTC "set seconds" sets late date #498
Comments
@wilberforce - I think this is your code. Would you take a look? (I don't have an M5 Stick C to try.) Thanks. |
Sure. I’ll take a look. It looks like the year offset is wrong.
Will use this as a reference:
https://github.com/tanakamasayuki/I2C_BM8563
… On 18/11/2020, at 4:43 AM, Peter Hoddie ***@***.***> wrote:
@wilberforce - I think this is your code. Would you take a look? (I don't have an M5 Stick C to try.) Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Cool, thanks. |
I added logs before set seconds(secs) {
...
trace(`[setDate]${date.month} ${date.date} ${date.year}\n`);
this._setDate(date);
} get seconds() {
let date = this._getDate();
trace(`[getDate]${date.month} ${date.date} ${date.year}\n`); this is log when button B pressed
Values of |
@stc1988
|
Pull request here: |
This year is leap year. Day adjustment problem is related to leap year. Anyway, Using javascript time function is nice idea. |
@wilberforce |
I confirmed it works again with version |
Version: November 16, 2020
Build environment: Windows
Target device: M5stick_c
Description
Value of get seconds after set seconds is late date
Expected behavior
The value of set seconds and get seconds is same value
Images
trace log before
set rtc.seconds
isNov 17 2020
, but displaying date ofget rtc.seconds
isNov 19 2020
Steps to Reproduce
build
examples/drivers/m5stickc-rtc
build command is mcconfig -d -m -p esp32/m5stick_c
Press button B to set seconds to RTC.
The text was updated successfully, but these errors were encountered: