Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs) Adding some additional clarity around low power states #2330

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

Nick-Munnich
Copy link
Contributor

@Nick-Munnich Nick-Munnich commented Jun 11, 2024

Minor improvements to resolve some questions that appeared on Discord. Also made a note of the soft-off/deep-sleep wakeup-sources issue, since I couldn't find that documented anywhere.

@caksoylar caksoylar added the documentation Improvements or additions to documentation label Jun 11, 2024
Copy link
Contributor

@caksoylar caksoylar left a comment

Choose a reason for hiding this comment

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

LGTM in general: While touching the soft-off page, do you mind adding a commit to remove label = .. properties from the examples in that page? That's the only spot they are left in the docs.

docs/docs/config/power.md Outdated Show resolved Hide resolved
docs/docs/features/soft-off.md Outdated Show resolved Hide resolved
@Nick-Munnich Nick-Munnich marked this pull request as draft June 13, 2024 13:10
@nVitius
Copy link

nVitius commented Jun 27, 2024

Upgraded the firmware on my keyboard recently. Ran into an issue where I couldn't wake it from sleep and couldn't figure out why until I saw this PR.

I'm not sure about the soft-off portion of this PR, but I think the comment about wakeup-source on the deep sleep docs is important to have.

@Nick-Munnich Nick-Munnich changed the title fix(docs) Adding some additional clarity around soft-off feat(docs) Adding some additional clarity around soft-off Jul 16, 2024
@Nick-Munnich Nick-Munnich changed the title feat(docs) Adding some additional clarity around soft-off feat(docs) Adding some additional clarity around low power states Jul 16, 2024
@Nick-Munnich
Copy link
Contributor Author

Thanks again Pete for the reply. I have done some larger changes to accommodate. I think this version reads much nicer. Unfortunately a rename was involved which makes reviewing it more difficult.

Essentially, the soft off feature page is renamed to low power states, and the information about idle and deep sleep were moved into it. I also documented how to reuse a key for wakeup-only, and how to make the &soft_off behave like &sleep. Some minor renaming was involved to make things read nicer.

All the content for the direct pin approach is tested and working. The content for the matrix-integrated and switch matrix wakeup-only was working, but currently isn't: see #2376. It may need some changing after said issue is resolved.

@Nick-Munnich Nick-Munnich marked this pull request as ready for review July 16, 2024 15:29
@caksoylar caksoylar self-assigned this Jul 18, 2024
docs/docs/behaviors/soft-off.md Outdated Show resolved Hide resolved
docs/docs/config/kscan.md Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.mdx Outdated Show resolved Hide resolved
@Nick-Munnich
Copy link
Contributor Author

Did some reshuffling to try and get the tabs behaving nicely without too much duplication. Since this required shoving a bunch of content into other files, I also did so for some content that doesn't get duplicated because it makes the file overall much easier to read.

The wakeup-only approach is much simplified and should be clearer now, with minor changes to the direct and matrix approaches as a result of the reshuffling.

Copy link
Contributor

@caksoylar caksoylar left a comment

Choose a reason for hiding this comment

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

The wakeup-only case is much clearer for me with these changes, thanks.

Couple general replacements:

  • [Bb]"ehaviour" -> "ehavior" (including filenames?)
  • [Kk]"eyswitch" -> "ey switch"

It would also be good to add dts to the fenced code blocks, since we get syntax highlighting for those.

docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/_sideband-matrix.md Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
docs/docs/features/low-power-states/low-power-states.mdx Outdated Show resolved Hide resolved
@Nick-Munnich
Copy link
Contributor Author

Made the dts and general replacements.

Copy link
Contributor

@caksoylar caksoylar left a comment

Choose a reason for hiding this comment

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

I am happy with this, thanks again for tackling it. However I'd appreciate if @petejohanson could go over the finished page to confirm whether

  • there are any technical correctness issues I missed
  • he has any concerns on documenting the wakeup-only approach

@Nick-Munnich
Copy link
Contributor Author

Nick-Munnich commented Aug 24, 2024

Did a refactoring of this to make it cleaner (as was discussed previously on Discord). Originally I intended to do the refactor after this is merged, but as it has been slow-going I decided to put in the effort to separate out the content. Should make everything easier to review as well. The "guide" portion is now a separate PR: #2439

I added what information I could to the config section, but it may need double-checking.

@Nick-Munnich
Copy link
Contributor Author

Nick-Munnich commented Sep 7, 2024

Folded the content from #2439 back into this - trying to get it nicely into separate PRs post development reshuffling was annoying me too much.

@petejohanson
Copy link
Contributor

I am happy with this, thanks again for tackling it. However I'd appreciate if @petejohanson could go over the finished page to confirm whether

* there are any technical correctness issues I missed

* he has any concerns on documenting the wakeup-only approach

All looks reasonable to me. The description of deep sleep is a tad... non-technical, and that may be the intention. If so, looks fine to me. If we want to offer more details on the specifics of the power state of the MCU, RAM retention (or not), etc., I'm not sure if that's best served living on that page or elsewhere.

@Nick-Munnich
Copy link
Contributor Author

If we want to offer more details on the specifics of the power state of the MCU, RAM retention (or not), etc., I'm not sure if that's best served living on that page or elsewhere.

This is a good idea. I'll have a go at adding such specifics when I touch this page up a bit again to get it ready for merging.

@Nick-Munnich Nick-Munnich force-pushed the soft-off-clarity branch 3 times, most recently from 3e847ee to 4bee39c Compare November 1, 2024 21:28
docs/docs/config/power.md Outdated Show resolved Hide resolved
docs/docs/config/power.md Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.md Show resolved Hide resolved
docs/docs/keymaps/behaviors/soft-off.md Outdated Show resolved Hide resolved
…ith guide portion moved to hardware integration

Co-authored-by: Cem Aksoylar <[email protected]>
Copy link
Contributor

@caksoylar caksoylar left a comment

Choose a reason for hiding this comment

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

Only a few small notes, LGTM otherwise.

docs/docs/features/low-power-states.md Outdated Show resolved Hide resolved
docs/docs/features/low-power-states.md Outdated Show resolved Hide resolved
@Nick-Munnich Nick-Munnich merged commit f4582bd into zmkfirmware:main Nov 2, 2024
7 checks passed
@Nick-Munnich Nick-Munnich deleted the soft-off-clarity branch November 2, 2024 22:20
EnotionZ pushed a commit to EnotionZ/zmk that referenced this pull request Nov 6, 2024
…kfirmware#2330)

* docs(feat): Adding some additional clarity around low power states, with guide portion moved to hardware integration

---------

Co-authored-by: Cem Aksoylar <[email protected]>
earwin pushed a commit to earwin/zmk that referenced this pull request Nov 13, 2024
…kfirmware#2330)

* docs(feat): Adding some additional clarity around low power states, with guide portion moved to hardware integration

---------

Co-authored-by: Cem Aksoylar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants