summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/SystemInfo.cpp
diff options
context:
space:
mode:
authorhubmartin <hub.martin@gmail.com>2021-08-29 11:43:50 +0200
committerhubmartin <hub.martin@gmail.com>2021-08-29 11:43:50 +0200
commit8390d0ef7243261675aab3a5c19862eb3fc53e68 (patch)
treea8429e8d2a455df8afe152197119075b5789e9fb /src/displayapp/screens/SystemInfo.cpp
parent51c5257548efe678ec8e18d8cdea2476672f1238 (diff)
parent6c023785e53c507f7cb20703f5f3a221ea095068 (diff)
Merge branch 'develop' into pinmap
Diffstat (limited to 'src/displayapp/screens/SystemInfo.cpp')
-rw-r--r--src/displayapp/screens/SystemInfo.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp
index e7c5b65a..b7a4fc60 100644
--- a/src/displayapp/screens/SystemInfo.cpp
+++ b/src/displayapp/screens/SystemInfo.cpp
@@ -65,13 +65,6 @@ SystemInfo::~SystemInfo() {
lv_obj_clean(lv_scr_act());
}
-bool SystemInfo::Refresh() {
- if (running) {
- screens.Refresh();
- }
- return running;
-}
-
bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
return screens.OnTouchEvent(event);
}
@@ -207,7 +200,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 +215,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};