Author: Mingjie Shen <shen497@purdue.edu>
SettingDisplay: Reduce buffer size Given that 2^16 / 1000 is 65, we can make the buffer only 3 chars.
src/displayapp/screens/settings/SettingDisplay.cpp | 2 +-
diff --git a/src/displayapp/screens/settings/SettingDisplay.cpp b/src/displayapp/screens/settings/SettingDisplay.cpp index 9abb4c74cfe695b371c0cb4119a929dc29f01452..bd533e675b7de2405257f8857f0af197cf1bd101 100644 --- a/src/displayapp/screens/settings/SettingDisplay.cpp +++ b/src/displayapp/screens/settings/SettingDisplay.cpp @@ -43,7 +43,7 @@ lv_label_set_text_static(icon, Symbols::sun); lv_label_set_align(icon, LV_LABEL_ALIGN_CENTER); lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0); - char buffer[12]; + char buffer[4]; for (unsigned int i = 0; i < options.size(); i++) { cbOption[i] = lv_checkbox_create(container1, nullptr); snprintf(buffer, sizeof(buffer), "%2" PRIu16 "s", options[i] / 1000);