Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
Merged

Rel 5 #573

Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
26a10b2
Update Pybytes to version 1.6.1
Xykon Nov 23, 2020
d600b20
Update pycom_version.h
Xykon Nov 23, 2020
742cc14
Update _pybytes_protocol.py
Xykon Nov 23, 2020
8340e1e
version 1.20.2.r3
peter-pycom Dec 23, 2020
3f690a5
Fix an issue that Bluetooth init() failed after deinit()
geza-pycom Dec 28, 2020
826e233
Add API create_128bit_le_uuid_from_string()
geza-pycom Oct 20, 2020
684e9da
Fix a bug causing multi-heap assert exception in modcoap and improve …
geza-pycom Dec 29, 2020
627e39c
removed exit 0 condition for tests
msariisik Jan 7, 2021
8cd6d21
revert back exit 0 condition on Jenkins
msariisik Jan 11, 2021
120f929
Rtc utime fix (#206)
gijsio Jan 11, 2021
f04187b
update version to 1.20.2.r4
peter-pycom Jan 11, 2021
af93a22
Merge pull request #215 from pycom/release_v1.20.2.r4
gijsio Jan 11, 2021
bee94a2
Merge remote-tracking branch 'public/Dev' into release_v1.20.2.r4
peter-pycom Jan 12, 2021
ffb0e1c
Merge pull request #515 from pycom/release_v1.20.2.r4_again
Xykon Jan 12, 2021
12e32a6
add gps coordinates to the pygate json status
gijsio Aug 27, 2020
c046f5f
fixes the re-initialization of lora OTAA
gijsio Aug 27, 2020
21af0b7
Revert "add gps coordinates to the pygate json status"
gijsio Aug 27, 2020
a5dff88
fixed the timeout
gijsio Aug 27, 2020
6153b01
removed commented code
gijsio Jan 15, 2021
144e161
Fix problem in mod_coap_resource_callback_enable() which forbids to d…
geza-pycom Jan 21, 2021
ed4e191
Lora reinit fix (#219)
gijsio Jan 25, 2021
9499afd
vfs_littlefs_file.c: Prevent double close of a file
robert-hh Jan 31, 2021
8baf148
vfs_littlefs_file.c: Move tagging files as closed.
robert-hh Mar 4, 2021
9253101
Adjust the fix so calling other file operations (e.g. write, read etc…
geza-pycom Mar 7, 2021
39ca300
Adjust to be the same as FatFs
geza-pycom Mar 7, 2021
56dd0ed
Add the modified functionality to the regression tests
geza-pycom Mar 7, 2021
a37510c
Update Copyright header
Xykon Mar 9, 2021
a66cdec
sflash_diskio_littlefs.c: Enable block level wear-leveling
robert-hh Jan 14, 2021
bdebb49
sflash_diskio_littlefs.c: change block_cycles to 100
geza-pycom Mar 21, 2021
7d28bd1
mperror.c: Move noticing of the next heartbeat transition (#235)
geza-pycom Apr 10, 2021
46d4a31
LTE: fix conditional in lte_check_attached
Jan 20, 2021
aace45a
Define uart id as int instead of mp_obj
knagymate Feb 16, 2020
d6a17b1
machuart: change default to UART 1
peter-pycom Feb 19, 2021
4cf7273
fix mpy-cross build
peter-pycom Feb 19, 2021
efaea4d
thread: allocate internal mem
peter-pycom Jun 30, 2021
39de84e
Merge pull request #279 from pycom/thread_malloc
gijsio Jul 16, 2021
b596cea
micropython task: allocate internal ram
gijsio Jul 16, 2021
68c0063
Fix for the missing certificated in WPA2 Enterprise connection (#263)
VladPetrovici Jun 28, 2021
08cbc20
update pybytes 1.7.0 975e984
peter-pycom Sep 22, 2021
04a4454
bump version to 1.20.2.r5
peter-pycom Sep 22, 2021
e932a94
lora: Fix losing of multicast params
peter-pycom Oct 5, 2021
b3b1575
Merge branch 'Dev' of github.com:pycom/pycom-micropython-sigfox into …
peter-pycom Oct 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rtc utime fix (#206)
* fixed setting time in rtc
* do not reset the time on init
  • Loading branch information
gijsio authored Jan 11, 2021
commit 120f929baa1fb92ebdfdba066f9c51b9a34df856
22 changes: 8 additions & 14 deletions esp32/mods/machrtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ typedef struct _mach_rtc_obj_t {
bool synced;
} mach_rtc_obj_t;

static RTC_DATA_ATTR uint64_t delta_from_epoch_til_boot;
static RTC_DATA_ATTR uint32_t rtc_user_mem_len;
static RTC_DATA_ATTR uint8_t rtc_user_mem_data[MEM_USER_MAXLEN];

Expand All @@ -61,10 +60,10 @@ void rtc_init0(void) {

void mach_rtc_set_us_since_epoch(uint64_t nowus) {
struct timeval tv;

// store the packet timestamp
gettimeofday(&tv, NULL);
delta_from_epoch_til_boot = nowus - (uint64_t)((tv.tv_sec * 1000000ull) + tv.tv_usec);
tv.tv_usec = nowus % 1000000ull;
tv.tv_sec = nowus / 1000000ull;
settimeofday(&tv, NULL);
}

void mach_rtc_synced (void) {
Expand All @@ -78,8 +77,9 @@ bool mach_is_rtc_synced (void) {
uint64_t mach_rtc_get_us_since_epoch(void) {
struct timeval tv;
gettimeofday(&tv, NULL);
return (uint64_t)((tv.tv_sec * 1000000ull) + tv.tv_usec) + delta_from_epoch_til_boot;
};
return (uint64_t)(tv.tv_sec * 1000000ull ) + (tv.tv_usec);

}

STATIC uint64_t mach_rtc_datetime_us(const mp_obj_t datetime) {
timeutils_struct_time_t tm;
Expand Down Expand Up @@ -132,8 +132,6 @@ STATIC void mach_rtc_datetime(const mp_obj_t datetime) {
if (datetime != mp_const_none) {
useconds = mach_rtc_datetime_us(datetime);
mach_rtc_set_us_since_epoch(useconds);
} else {
mach_rtc_set_us_since_epoch(0);
}
}

Expand Down Expand Up @@ -197,14 +195,10 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mach_rtc_init_obj, 1, mach_rtc_init);
STATIC mp_obj_t mach_rtc_now (mp_obj_t self_in) {
timeutils_struct_time_t tm;
uint64_t useconds;

useconds = mach_rtc_get_us_since_epoch();

struct timeval now;
gettimeofday(&now, NULL);

// get the time from the RTC
useconds = (now.tv_sec * 1000000ull ) + (now.tv_usec);
timeutils_seconds_since_epoch_to_struct_time((useconds) / 1000000ull, &tm);

mp_obj_t tuple[8] = {
mp_obj_new_int(tm.tm_year),
mp_obj_new_int(tm.tm_mon),
Expand Down