aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-05 15:54:45 -0700
committerSelene ToyKeeper2023-11-05 15:54:45 -0700
commit76fd7e313f2cab83c879cbf8a09cddc6585d3a76 (patch)
tree8a01a3265231b1d3470374e0ef1b9214f2405fb9
parentFixes syntax errors when USE_MANUAL_MEMORY is undefined. (diff)
parentMerge branch 'gretel-actions' into trunk (diff)
downloadanduril-76fd7e313f2cab83c879cbf8a09cddc6585d3a76.tar.gz
anduril-76fd7e313f2cab83c879cbf8a09cddc6585d3a76.tar.bz2
anduril-76fd7e313f2cab83c879cbf8a09cddc6585d3a76.zip
Merge branch 'trunk' into DurvalMenezes-undef_USE_MANUAL_MEMORY_fix
* trunk: removed test branch from action triggers (the action works and seems ready to merge) test: is apt-get any faster than apt? github actions: cache the Atmel DFP files between runs fixed intentional error, because CI build-fail test worked correctly help CI detect build failures initial test to fix branch names and see if actions work make clean: don't remove files in arch/dfp/ docs: added info on contributing, fixed minor formatting issues basic compile workflow publishing artifacts to test
Diffstat (limited to '')
-rw-r--r--.github/workflows/compile.yml49
-rw-r--r--README.md23
-rwxr-xr-xbin/build-all.sh1
-rw-r--r--docs/anduril-manual.md39
-rwxr-xr-xmake8
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
diff --git a/README.md b/README.md
index 4bad7ad..ba0786e 100644
--- a/README.md
+++ b/README.md
@@ -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.**
diff --git a/make b/make
index d0d1a5d..89e196d 100755
--- a/make
+++ b/make
@@ -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
}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.