diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | README.md | 23 | ||||
| -rwxr-xr-x | bin/detect-mcu.sh | 4 | ||||
| -rw-r--r-- | docs/anduril-manual.md | 39 | ||||
| -rw-r--r-- | hw/hank/noctigon-k9.3/219/model | 1 | ||||
| -rw-r--r-- | hw/hank/noctigon-k9.3/arch | 1 | ||||
| -rw-r--r-- | hw/hank/noctigon-k9.3/model | 1 | ||||
| -rw-r--r-- | hw/hank/noctigon-k9.3/nofet/model | 1 | ||||
| -rwxr-xr-x | make | 4 |
9 files changed, 58 insertions, 18 deletions
@@ -4,8 +4,6 @@ hex/ ignore/ old/ *~ -*.[0123456789] -*.[0123456789][0123456789] *.cpp *.elf *.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/detect-mcu.sh b/bin/detect-mcu.sh index 64bce96..761eac1 100755 --- a/bin/detect-mcu.sh +++ b/bin/detect-mcu.sh @@ -36,6 +36,10 @@ while [ -n "$TARGET" ]; do fi fi fi + # move up one dir + # if target doesn't change here, exit to avoid infinite loop + FOO="$TARGET" TARGET=$(dirname $TARGET) + [ "$FOO" = "$TARGET" ] && exit 1 done 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.** diff --git a/hw/hank/noctigon-k9.3/219/model b/hw/hank/noctigon-k9.3/219/model new file mode 100644 index 0000000..555cc1e --- /dev/null +++ b/hw/hank/noctigon-k9.3/219/model @@ -0,0 +1 @@ +0263 diff --git a/hw/hank/noctigon-k9.3/arch b/hw/hank/noctigon-k9.3/arch new file mode 100644 index 0000000..5d99bab --- /dev/null +++ b/hw/hank/noctigon-k9.3/arch @@ -0,0 +1 @@ +attiny1634 diff --git a/hw/hank/noctigon-k9.3/model b/hw/hank/noctigon-k9.3/model new file mode 100644 index 0000000..ce5169a --- /dev/null +++ b/hw/hank/noctigon-k9.3/model @@ -0,0 +1 @@ +0261 diff --git a/hw/hank/noctigon-k9.3/nofet/model b/hw/hank/noctigon-k9.3/nofet/model new file mode 100644 index 0000000..f30f0d0 --- /dev/null +++ b/hw/hank/noctigon-k9.3/nofet/model @@ -0,0 +1 @@ +0262 @@ -54,8 +54,8 @@ 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 |
