Skip to content

Commit 5f76cf7

Browse files
committed
fix/startup/stickcplus: Getting wrong user id and out of memory
Signed-off-by: lbuque <[email protected]>
1 parent 3a04238 commit 5f76cf7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

m5stack/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void mp_task(void *pvParameter) {
142142
#if CONFIG_IDF_TARGET_ESP32S3
143143
mp_task_heap_size = MIN(heap_caps_get_largest_free_block(MALLOC_CAP_8BIT), heap_total / 2) - (30 * 1024);
144144
#else
145-
mp_task_heap_size = MIN(heap_caps_get_largest_free_block(MALLOC_CAP_8BIT), heap_total / 2);
145+
mp_task_heap_size = MIN(heap_caps_get_largest_free_block(MALLOC_CAP_8BIT), heap_total / 2) - (40 * 1024);
146146
#endif
147147
mp_task_heap = malloc(mp_task_heap_size);
148148
}

m5stack/modules/startup/stickcplus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def _get_cloud_status(self):
389389

390390
def _get_user_id(self):
391391
if _HAS_SERVER:
392-
return None if len(M5Things.status()[1]) is 0 else M5Things.status()[1]
392+
return None if len(M5Things.info()[1]) is 0 else M5Things.info()[1]
393393
else:
394394
return None
395395

@@ -526,7 +526,7 @@ async def _keycode_dpad_down_event_handler(self, fw):
526526
self._server = "sg.m5stack.com"
527527
else:
528528
self._server = "uiflow2.m5stack.com"
529-
self._set_server(self._server)
529+
# self._set_server(self._server)
530530
self._update_data()
531531
self._load_view()
532532

0 commit comments

Comments
 (0)