GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Refactor doNotGoToSleep to a wakelock counter by mark9064 · Pull Request #2107 · InfiniTimeOrg/InfiniTime

Conversation

@mark9064

@mark9064 mark9064 commented Aug 23, 2024

Copy link
Copy Markdown
Member

Rather than tracking whether sleeping is disabled with a boolean, this moves it to a counter which records the number of requests to keep the device awake. When this counter is zero, sleeping is possible. This prevents one task from enabling sleeping when another task still wants sleeping disabled.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NeroBurner and tituscmd reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@github-actions

github-actions Bot commented Aug 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Build size and comparison to main:

Section Size Difference
text 374232B 128B
data 948B 0B
bss 63480B 0B
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064

mark9064 commented Aug 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Couple rebase mistakes breaking build I'll patch them this evening
Edit: done

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064
mark9064 force-pushed the wakelocks branch from 698ec16 to 51a3a84 Compare August 23, 2024 13:23
@mark9064
mark9064 force-pushed the wakelocks branch from 51a3a84 to 38cb28a Compare September 14, 2024 10:54
@mark9064

mark9064 commented Sep 14, 2024

Copy link
Copy Markdown
Member Author

Rebased to resolve conflicts

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NeroBurner
NeroBurner requested changes Sep 18, 2024
View reviewed changes
Comment thread src/systemtask/WakeLock.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/systemtask/WakeLock.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

@JF002 JF002 added this to the 1.15.0 milestone Sep 21, 2024
JF002
JF002 approved these changes Sep 21, 2024
View reviewed changes
NeroBurner added a commit to InfiniTimeOrg/InfiniSim that referenced this pull request Sep 21, 2024
@NeroBurner
Support WakeLock.h for doNotGoToSleep Refactor
8b05cf1
For InfiniTime PR InfiniTimeOrg/InfiniTime#2107
a new systemtask file is introduced `WakeLock.h` and `WakeLock.cpp`.

If available add those files to the build target to support the current
`main` and the new `WakeLock` using redesign.
NeroBurner added a commit to InfiniTimeOrg/InfiniSim that referenced this pull request Sep 21, 2024
@NeroBurner
Support WakeLock.h for doNotGoToSleep Refactor
f5d56c6
For InfiniTime PR InfiniTimeOrg/InfiniTime#2107
a new systemtask file is introduced `WakeLock.h` and `WakeLock.cpp`.

If available add those files to the build target to support the current
`main` and the new `WakeLock` using redesign.
@NeroBurner NeroBurner mentioned this pull request Sep 21, 2024
Support WakeLock.h for doNotGoToSleep Refactor InfiniTimeOrg/InfiniSim#150
Merged
NeroBurner
NeroBurner requested changes Sep 21, 2024
View reviewed changes

@NeroBurner NeroBurner left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I've updated the InfiniSim to use WakeLock.cpp if it is available, fixing this PR build pipeline
InfiniTimeOrg/InfiniSim#150

Just the little newline and we're good to go from my side

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/systemtask/WakeLock.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/systemtask/WakeLock.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

NeroBurner added a commit to InfiniTimeOrg/InfiniSim that referenced this pull request Sep 21, 2024
@NeroBurner
Support WakeLock.h for doNotGoToSleep Refactor
5f076b8
For InfiniTime PR InfiniTimeOrg/InfiniTime#2107
a new systemtask file is introduced `WakeLock.h` and `WakeLock.cpp`.

If available add those files to the build target to support the current
`main` and the new `WakeLock` using redesign.
@NeroBurner

NeroBurner commented Sep 21, 2024

Copy link
Copy Markdown
Contributor

merge conflict after #2109 got merged. Please resolve them when doing the little newline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064
mark9064 force-pushed the wakelocks branch from 38cb28a to 992e555 Compare September 21, 2024 20:31
@mark9064

mark9064 commented Sep 21, 2024

Copy link
Copy Markdown
Member Author

I also moved the destructor as IMO code should be minimally surprising, and now I think about it you don't really expect to find code in the header (except maybe const getters)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064
Refactor doNotGoToSleep to a wakelock counter
0ebdf61
@mark9064
mark9064 force-pushed the wakelocks branch from 992e555 to 0ebdf61 Compare September 21, 2024 20:33
@mark9064

mark9064 commented Sep 21, 2024

Copy link
Copy Markdown
Member Author

I always miss those formatting errors when rebasing...

NeroBurner reacted with laugh emoji NeroBurner reacted with eyes emoji
All reactions
  • 😄 1 reaction
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NeroBurner
NeroBurner approved these changes Sep 21, 2024
View reviewed changes

@NeroBurner NeroBurner left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I also mess up formating on rebases 😁 That's why I love the CI job checking it for me ^^

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@NeroBurner NeroBurner mentioned this pull request Sep 21, 2024
Improve clang-format to check newlines at end of file #2127
Open
1 task done
@NeroBurner
NeroBurner merged commit 7ca0418 into InfiniTimeOrg:main Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@NeroBurner NeroBurner NeroBurner approved these changes
@FintasticMan FintasticMan FintasticMan left review comments
@JF002 JF002 JF002 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

1.15.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mark9064 @NeroBurner @JF002 @FintasticMan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.