diff options
| -rw-r--r-- | .github/workflows/compile.yml | 49 | ||||
| -rw-r--r-- | README.md | 23 | ||||
| -rwxr-xr-x | bin/build-all.sh | 1 | ||||
| -rw-r--r-- | docs/anduril-manual.md | 39 | ||||
| -rwxr-xr-x | make | 8 |
5 files changed, 102 insertions, 18 deletions
diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..fabcf31 --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,49 @@ +name: build all + +on: + push: + branches: [ "trunk" ] + pull_request: + branches: [ "trunk" ] + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@master + + - name: Requirements + run: | + sudo apt-get -qqy update + sudo apt-get -qqy install avr-libc binutils-avr gcc-avr unzip wget + + - name: Cache Atmel DFPs + id: cache-dfp + uses: actions/cache@v3 + env: + cache-name: cache-dfp-files + with: + path: arch/dfp + # new cache whenever the dfp-install script changes + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('bin/dfp-install.sh') }} + + - name: Install Atmel DFPs + if: steps.cache-dfp.outputs.cache-hit != 'true' + run: | + ./make dfp + + - name: Compile All + run: | + ./make + echo "ARTIFACT_NAME=${GITHUB_WORKFLOW}-${GITHUB_REF_NAME}-$(git rev-parse --short ${GITHUB_SHA})-${GITHUB_RUN_NUMBER}" >> "${GITHUB_ENV}" + + - name: Store Artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ env.ARTIFACT_NAME }} + if-no-files-found: error + path: | + hex/*.hex @@ -8,6 +8,7 @@ you like, such as "Flashlight" or whatever suits your mood. FSM also means "Finite State Machine", which is the type of abstraction used for defining user interfaces. It is like a flowchart turned into executable code. + ## Using Anduril Anduril has many features, but the only things a person *really* needs to know @@ -25,6 +26,7 @@ For info about hardware-specific features, like what the channel modes are on multi-channel lights, browse into the [hw/](hw/) directories to find the hardware model and any hardware-specific documentation. + ## Flashing Firmware Get the latest updates by flashing new firmware! @@ -57,6 +59,7 @@ One particularly useful guide is at https://anduril.click/ . More info about installing flashing programs is below, in [Flashing Programs](#flashing-programs). + ## Compiling The firmware can be deeply customized by modifying it and compiling your own @@ -91,6 +94,7 @@ firmwares for Hanklights with optional boost drivers. The compiled firmware goes into the `hex/` directory, ready to be used by any firmware flashing program. + ## Customizing Settings Per User The build can be [customized per user](docs/per-user-config.md) by placing @@ -98,6 +102,7 @@ overrides into the `users/myname/` directory and letting the build script know your username. That way, your favorite settings can be applied automatically without having to modify the original source files. + ## Flashing Programs ### AVRdude @@ -121,3 +126,21 @@ You'll need to `source env/bin/activate` every time you start a fresh shell, if you want to use pymcuprog. The activation lasts until the shell is closed or until you run `deactivate`. + +## Contributing + +If you'd like to help, there are several ways... + + - ToyKeeper has a [Patreon site](https://patreon.com/ToyKeeper) for + donations, to help figuratively and literally keep the lights on. + + - Send pull requests or patches, to improve things directly. These can be + code, documentation, tools, or anything you think is useful. + + - File bug reports for any problems you find. + + - Answer people's questions on public forums. If the same questions come up + a lot, consider adding it to the documentation here. + + - Ask manufacturers to use this firmware, and to support its development. + diff --git a/bin/build-all.sh b/bin/build-all.sh index 2d443a5..ac8ea98 100755 --- a/bin/build-all.sh +++ b/bin/build-all.sh @@ -66,4 +66,5 @@ echo "===== $PASS builds succeeded, $FAIL failed =====" #echo "PASS: $PASSED" if [ 0 != $FAIL ]; then echo "FAIL:$FAILED" + exit 1 fi diff --git a/docs/anduril-manual.md b/docs/anduril-manual.md index 79b39c0..830ecde 100644 --- a/docs/anduril-manual.md +++ b/docs/anduril-manual.md @@ -225,8 +225,9 @@ While the light is on, a few actions are available: - `2C`: Go to or from the turbo level. (or if it has regulated down, "bump" back up to turbo) (turbo level / behavior is configurable) - - `1H`: Change brightness (up). If the button was released less than a - second ago, or if it's already at the ceiling, it goes down instead. + - `1H`: Change brightness (up). + If the button was released less than a second ago, or if it's already + at the ceiling, it goes down instead. - `2H`: Change brightness (down). - `3C`: Switch to the other ramp style. (smooth / stepped) @@ -595,8 +596,8 @@ in Ramp Mode before entering momentary mode. In momentary strobe mode, the settings are copied from the last-used strobe mode, such as party strobe, tactical strobe, or lightning. -To exit this mode, physically disconnect power by unscrewing the tailcap -or battery tube. +**To exit Momentary Mode, physically disconnect power** by unscrewing the +tailcap or battery tube. Tactical Mode @@ -678,23 +679,33 @@ not active, then do a `10H` action from Off. For smooth ramping mode, there are three menu options: - 1. Floor. (default = 1/150) - 2. Ceiling. (default = 120/150) - 3. Ramp speed. (default = 1, fastest speed) + 1. Floor. + (default = 1/150) + 2. Ceiling. + (default = 120/150) + 3. Ramp speed. + (default = 1, fastest speed) For the stepped ramping mode, there are three menu options: - 1. Floor. (default = 20/150) - 2. Ceiling. (default = 120/150) - 3. Number of steps. (default = 7) + 1. Floor. + (default = 20/150) + 2. Ceiling. + (default = 120/150) + 3. Number of steps. + (default = 7) For the Simple UI mode, there are four menu options. The first three are the same as stepped ramping mode. - 1. Floor. (default = 20/150) - 2. Ceiling. (default = 120/150) - 3. Number of steps. (default = 5) - 4. Turbo style. (default = 0, no turbo) + 1. Floor. + (default = 20/150) + 2. Ceiling. + (default = 120/150) + 3. Number of steps. + (default = 5) + 4. Turbo style. + (default = 0, no turbo) **Default values are different for each model of flashlight. The numbers above are only examples.** @@ -54,12 +54,12 @@ function main() { help ;; clean) - echo 'rm -vf **/*.hex **/*~ **/*.elf **/*.o **/*.cpp' - rm -vf **/*.hex **/*~ **/*.elf **/*.o **/*.cpp + echo 'rm -vf **/*~ hex/*.hex ui/**/*.elf ui/**/*.o ui/**/*.cpp' + rm -vf **/*~ hex/*.hex ui/**/*.elf ui/**/*.o ui/**/*.cpp ;; dfp) shift - ./bin/dfp-install.sh "$@" + exec ./bin/dfp-install.sh "$@" ;; docs) make-docs @@ -79,7 +79,7 @@ function main() { grep -E 'TODO:|FIXME:' **/*.[ch] ;; *) - ./bin/build-all.sh "$@" + exec ./bin/build-all.sh "$@" ;; esac } |
