diff options
| author | JF002 <JF002@users.noreply.github.com> | 2021-08-28 15:06:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-28 15:06:03 +0200 |
| commit | 969de9a8bccfa97da29de2eac61be9325dd2fdaa (patch) | |
| tree | 820a3bbe74993ff6ce6b7f430d187a397a46f363 /src/displayapp/screens/SystemInfo.cpp | |
| parent | df8ea7fe523bb9ec0ac3e24f0b1bebe5743d90cc (diff) | |
| parent | 85c99797dad39348976d92ecf935536f362ee2c5 (diff) | |
Merge pull request #492 from Riksu9000/new_touch_handler
New touch handler
Diffstat (limited to 'src/displayapp/screens/SystemInfo.cpp')
| -rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index e7c5b65a..35337511 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -207,7 +207,7 @@ bool SystemInfo::sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs) { } std::unique_ptr<Screen> SystemInfo::CreateScreen4() { - TaskStatus_t tasksStatus[7]; + TaskStatus_t tasksStatus[10]; lv_obj_t* infoTask = lv_table_create(lv_scr_act(), NULL); lv_table_set_col_cnt(infoTask, 4); lv_table_set_row_cnt(infoTask, 8); @@ -222,9 +222,9 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen4() { lv_table_set_cell_value(infoTask, 0, 3, "Free"); lv_table_set_col_width(infoTask, 3, 90); - auto nb = uxTaskGetSystemState(tasksStatus, 7, nullptr); + auto nb = uxTaskGetSystemState(tasksStatus, sizeof(tasksStatus) / sizeof(tasksStatus[0]), nullptr); std::sort(tasksStatus, tasksStatus + nb, sortById); - for (uint8_t i = 0; i < nb; i++) { + for (uint8_t i = 0; i < nb && i < 7; i++) { lv_table_set_cell_value(infoTask, i + 1, 0, std::to_string(tasksStatus[i].xTaskNumber).c_str()); char state[2] = {0}; |
