Skip to content

Conversation

@NeroBurner
Copy link
Contributor

@NeroBurner NeroBurner commented Sep 18, 2024

In the screens that use DisplayApp *app and pass it to a child item, or use the reference just in the constructor. Afterwards the app member is not used. So remove it from the private member variables.

SettingDisplay.h actually never uses DisplayApp *app and the parameter could be removed from the constructor. I'd be happy about feedback whether or not to remove it.
Completely remove app parameter from SettingDisplay constructor as it is unused.

@NeroBurner NeroBurner added the maintenance Background work label Sep 18, 2024
@github-actions
Copy link

github-actions bot commented Sep 18, 2024

Build size and comparison to main:

Section Size Difference
text 374136B -48B
data 948B 0B
bss 63480B 0B

@NeroBurner NeroBurner force-pushed the remove_unused_app_member branch from e61860b to d1a0377 Compare September 18, 2024 19:11
@NeroBurner
Copy link
Contributor Author

build error because of unused variable, removing app from constructor

 /__w/InfiniTime/InfiniTime/src/displayapp/screens/settings/SettingDisplay.cpp:27:68: error: unused parameter 'app' [-Werror=unused-parameter]
   27 | SettingDisplay::SettingDisplay(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
cc1plus: all warnings being treated as errors

In the screens that use `DisplayApp *app` and pass it to a child item,
or use the reference just in the constructor. Afterwards the `app`
member is not used. So remove it from the private member variables.

Completely remove `app` parameter from `SettingDisplay` constructor as
it is unused.
@NeroBurner NeroBurner force-pushed the remove_unused_app_member branch from d1a0377 to a202a3f Compare September 18, 2024 19:13
@NeroBurner NeroBurner requested a review from a team September 18, 2024 19:21
@NeroBurner NeroBurner added this to the 1.15.0 milestone Sep 19, 2024
Copy link
Member

@FintasticMan FintasticMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@NeroBurner NeroBurner merged commit 3db4e01 into main Sep 29, 2024
@NeroBurner NeroBurner deleted the remove_unused_app_member branch September 29, 2024 17:39
headblockhead added a commit to headblockhead/InfiniTime that referenced this pull request Oct 4, 2024
* Remove unused pointer to DisplayApp member variables (InfiniTimeOrg#2125)

In the screens that use `DisplayApp *app` and pass it to a child item,
or use the reference just in the constructor. Afterwards the `app`
member is not used. So remove it from the private member variables.

Completely remove `app` parameter from `SettingDisplay` constructor as
it is unused.

* MusicService: add missing includes for TickType_t and xTaskGetTickCount (InfiniTimeOrg#2130)

Add `FreeRTOS.h` include for the directly used data type `TickType_t` in the header
and the function `xTaskGetTickCount` from FreeRTOS's `task.h`

* settings: Add global widget selection

Instead of each watch face implementing their own settings for which
widgets to display, we can have a global selection of widgets. All
watch faces can then determine whether it is enabled and so display it
in whichever way makes sense for that face.

Current widgets supported are heart rate, step counter, and weather.

* WatchFaceAnalog: Add configurable widgets

* WatchFaceAnalog: Add weather widget

---------

Co-authored-by: NeroBurner <pyro4hell@gmail.com>
Co-authored-by: Victor Kareh <vkareh@redhat.com>
headblockhead added a commit to headblockhead/InfiniTime that referenced this pull request Oct 4, 2024
* Remove unused pointer to DisplayApp member variables (InfiniTimeOrg#2125)

In the screens that use `DisplayApp *app` and pass it to a child item,
or use the reference just in the constructor. Afterwards the `app`
member is not used. So remove it from the private member variables.

Completely remove `app` parameter from `SettingDisplay` constructor as
it is unused.

* MusicService: add missing includes for TickType_t and xTaskGetTickCount (InfiniTimeOrg#2130)

Add `FreeRTOS.h` include for the directly used data type `TickType_t` in the header
and the function `xTaskGetTickCount` from FreeRTOS's `task.h`

* BatteryIcon: Change color with charge percentage

---------

Co-authored-by: NeroBurner <pyro4hell@gmail.com>
Co-authored-by: Victor Kareh <vkareh@redhat.com>
headblockhead added a commit to headblockhead/InfiniTime that referenced this pull request Oct 4, 2024
* Remove unused pointer to DisplayApp member variables (InfiniTimeOrg#2125)

In the screens that use `DisplayApp *app` and pass it to a child item,
or use the reference just in the constructor. Afterwards the `app`
member is not used. So remove it from the private member variables.

Completely remove `app` parameter from `SettingDisplay` constructor as
it is unused.

* MusicService: add missing includes for TickType_t and xTaskGetTickCount (InfiniTimeOrg#2130)

Add `FreeRTOS.h` include for the directly used data type `TickType_t` in the header
and the function `xTaskGetTickCount` from FreeRTOS's `task.h`

* Improved the Terminal Watchfaces UI

+ Reorder code to match the widgets order in the UI.

+ Use InfintimeTheme Colors instead of hardcoded hex values

+ Added a new InfinitimeTheme color: gray, using it to turn certain
  values gray when they contain no data

+ Implement @vkareh's [variable battery icon](InfiniTimeOrg#1964)
  color to the battery percentage text.

+ Replaced the 'You have mail.' notification message with the message
  '[1]+ Notify' to better fit the terminal lore.

---------

Co-authored-by: NeroBurner <pyro4hell@gmail.com>
Co-authored-by: JustScott <development@justscott.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Background work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants