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

Fix invalid get_time calls #3

Merged
merged 2 commits into from Sep 25, 2019
Merged

Conversation

brentru
Copy link
Member

@brentru brentru commented Sep 25, 2019

Adding a valid_time property for set_time calls from user-code to detect error raised by ESP32SPI (adafruit/Adafruit_CircuitPython_ESP32SPI#73)

Addresses issue: #2

Tested on Adafruit CircuitPython 4.1.0 on 2019-08-02; Adafruit Metro M4 Airlift Lite with samd51j19

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Connecting to AP...
Failed to obtain time, retrying in 5 seconds...
Failed to obtain time, retrying in 5 seconds...
Seconds since Jan 1, 1970: 1569422698 seconds
struct_time(tm_year=2019, tm_mon=9, tm_mday=25, tm_hour=14, tm_min=44, tm_sec=58, tm_wday=2, tm_yday=268, tm_isdst=-1)
It is currently 9/25/2019 at 14:44:58 UTC

@brentru brentru requested review from jerryneedell and a team September 25, 2019 14:53
Copy link

@jerryneedell jerryneedell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- tested on a grand_central with airlift.

>>> 
>>> 
>>> import ntp_simpletest
Connecting to AP...
Failed to obtain time, retrying in 5 seconds...
Failed to obtain time, retrying in 5 seconds...
Seconds since Jan 1, 1970: 1569423932 seconds
struct_time(tm_year=2019, tm_mon=9, tm_mday=25, tm_hour=15, tm_min=5, tm_sec=32, tm_wday=2, tm_yday=268, tm_isdst=-1)
It is currently 9/25/2019 at 15:5:32 UTC
>>> 

@brentru
Copy link
Member Author

brentru commented Sep 25, 2019

@jerryneedell Thanks for testing, merging in.

@brentru brentru merged commit 69b0131 into adafruit:master Sep 25, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Sep 25, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_APDS9960 to 1.2.5 from 1.2.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_APDS9960#14 from kattni/fix-up

Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306 to 1.1.2 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306#5 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 2.0.0 from 1.9.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#75 from anecdata/bssid_channel

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.6.6 from 2.6.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#31 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#30 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_NTP to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_NTP#3 from brentru/fix-overflow
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 this pull request may close these issues.

None yet

2 participants