diff --git a/.clangd b/.clangd index af27531..57db24e 100644 --- a/.clangd +++ b/.clangd @@ -5,7 +5,7 @@ CompileFlags: Add: # clang has no 24-bit integer and GCC's are keywords, not macros, so the # editor needs a stand-in for avr::uint24_t. The next width up is the only - # one available — clang rejects _BitInt(24) on this target. + # one available - clang rejects _BitInt(24) on this target. - -D__uint24=unsigned long - -D__int24=long # clangd forwards the driver's system includes but not its own header @@ -14,7 +14,7 @@ CompileFlags: - -D__STDC_LIMIT_MACROS - -D__STDC_CONSTANT_MACROS # isr::emit spells a vector number into [[gnu::signal(N)]], which clang - # rejects rather than ignores — enough of them in one TU to reach the + # rejects rather than ignores - enough of them in one TU to reach the # default limit of 19 inside the headers and truncate the parse. - -ferror-limit=0 Remove: diff --git a/.gitattributes b/.gitattributes index 6755504..513bcd1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,12 +1,7 @@ -# Line endings are the repository's, not the editing machine's: this checkout -# is reached from two hosts, and a file rewritten by a Windows tool comes back -# with every line changed unless something says otherwise. Naming the source -# extensions left Markdown, Python, shell and CMake to whatever the writing -# tool defaulted to, which is CRLF on one of the two. +# Line endings are the repository's, not the editing tool's: a file rewritten +# by a Windows tool must not come back with every line changed. * text=auto eol=lf # Atmel Studio writes these and expects them back. -*.vcxproj* eol=crlf *.cppproj eol=crlf -*.sln eol=crlf *.atsln eol=crlf diff --git a/CMakeLists.txt b/CMakeLists.txt index 40ec898..26473e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,14 +37,12 @@ add_custom_command(TARGET fantemp POST_BUILD COMMAND ${CMAKE_OBJCOPY} -O ihex -R .eeprom $ $/fantemp.hex) -# The board's loader, built here rather than named from memory: consuming -# pureboot for its geometry alone left the one image this deployment cannot be -# recovered without outside the repository that pins it. Every parameter is -# pureboot's own default for this chip - USART0 at 115200 on the 16 MHz crystal -# `src/board.hpp` declares - and that is measured rather than assumed, the -# image being byte-for-byte the 386 B the board's slot reads back. It goes on -# over the wire (`--update-loader`), which is why there is no flash target -# beside it: no programmer has ever been in this board's path. +# The board's loader, built from the pin, so the one image this deployment +# cannot be recovered without is rebuilt by the commit that names it. Every +# parameter is pureboot's own default for this chip - USART0 at 115200 on the +# 16 MHz crystal `src/board.hpp` declares. It goes on over the wire +# (`--update-loader`), which is why there is no flash target beside it: the +# board has no programming header. pureboot_add_loader(pureboot) enable_testing() diff --git a/README.md b/README.md index 732628e..433cf06 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Commands may be abbreviated to any unambiguous-by-order prefix, as the legacy firmware allowed: `up` is `uptime`, `st` is `statistics`, `sa` is `save`. The table order resolves ties, so `s` is `show` — and `reset` is deliberately the one command that cannot be abbreviated, because `r` should not be able to wipe the -histogram. `save` (new) forces a writeback, which otherwise happens every 30 +histogram. `save` forces a writeback, which otherwise happens every 30 minutes and on the way into the bootloader. `show`, `statistics` and the histogram print one value per line behind a dotted @@ -28,9 +28,8 @@ from 10 to 60 with a bar, because the curve is a cubic and five-degree samples without a graph show none of its shape. **Ctrl+C** abandons a half-typed line and gives a fresh prompt, echoing `^C`, and -it is what stops `monitor`. Stopping on *any* byte, which is what the port did -first, reads well right up until a host sends a line ending: `monitor\r\n` then -stopped itself on the `\n` it arrived with, one reading in. +it is what stops `monitor`. Stopping on *any* byte would not do: a host's line +ending would stop `monitor\r\n` on the `\n` it arrived with, one reading in. ## Reaching the bootloader diff --git a/src/curve.hpp b/src/curve.hpp index fc93ad6..a78d3e7 100644 --- a/src/curve.hpp +++ b/src/curve.hpp @@ -6,7 +6,7 @@ #include // The auto-mode fan curve, tabulated at compile time as a flash_table of duty -// percent per C: a cubic that is held at zero below the temperature the fan +// percent per degree C: a cubic that is held at zero below the temperature the fan // starts at. namespace app::curve { diff --git a/src/statistics.hpp b/src/statistics.hpp index 4b22734..c5455eb 100644 --- a/src/statistics.hpp +++ b/src/statistics.hpp @@ -7,7 +7,7 @@ #include "board.hpp" -// Temperature histogram: one uint32 bucket per C 0..99, sampled once a +// Temperature histogram: one uint32 bucket per degree C 0..99, sampled once a // second, written back to EEPROM every 30 minutes (update() only touches // changed bytes). namespace app { diff --git a/tools/check.sh b/tools/check.sh index 40de33e..0a6de73 100755 --- a/tools/check.sh +++ b/tools/check.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash # The task gate: every configure preset built, and only then every one tested. # -# The loop itself is libavr's (tools/check-presets.sh) because the order in it -# is subtle and was got wrong by hand more than once - the mode-identity checks -# read the sibling mode's tree, so a build-then-test-per-preset run compares a +# The loop is libavr's (tools/check-presets.sh): the mode-identity checks read +# the sibling mode's tree, so a build-then-test-per-preset run would compare a # fresh image against a stale sibling. Anything this repository needs beyond -# the presets is written after the call, where every tree is built and tested. +# the presets goes after the call, where every tree is built and tested. set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")/.." "${LIBAVR_ROOT:-libavr}/tools/check-presets.sh" "$@"