From a1bb12659b8c7950a76a542cdaa057d7a2cb2053 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 3 Nov 2023 13:02:42 -0600 Subject: documentation updates... - fleshed out main README.md a bit - improved github formatting for docs/which-hex-file.md - added 'make docs' to preview .md files as .html - ignore html files generated by 'make docs' - removed rampingios-v3.html file generated years ago --- .gitignore | 1 + README | 184 -------------- README.md | 89 ++++++- docs/README.old.from-bzr-repo.txt | 184 ++++++++++++++ docs/which-hex-file.md | 27 +- make | 12 + ui/rampingios/rampingios-v3.html | 501 -------------------------------------- 7 files changed, 297 insertions(+), 701 deletions(-) delete mode 100644 README create mode 100644 docs/README.old.from-bzr-repo.txt delete mode 100644 ui/rampingios/rampingios-v3.html diff --git a/.gitignore b/.gitignore index d7889f9..9c7486d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ old/ *.cpp *.elf *.hex +*.html *.o *.old .*.swo diff --git a/README b/README deleted file mode 100644 index a8118f7..0000000 --- a/README +++ /dev/null @@ -1,184 +0,0 @@ -ToyKeeper's flashlight firmware repository -========================================== - -This is a collection of firmware for flashlights or torches, mostly -collected from BLF (http://budgetlightforum.com/). It's collected -here mostly for convenience, and to provide bug tracking and revision -control services for the code. - -See the INDEX file to find out which projects might be relevant to -your needs. - - -Getting Started -=============== - -The central firmware thread on BLF is here: - - http://budgetlightforum.com/node/38364 - -A general overview of what you need to get going is here: - - http://flashlightwiki.com/AVR_Drivers - -Some useful hardware for flashing firmware: - - What TK uses: - - http://www.fasttech.com/product/1002900-atmega-attiny-51-avr-isp-usbasp-usb-programmer - http://www.fasttech.com/product/1011800-40-pin-splittable-ribbon-cable-20cm - http://www.digikey.com/product-detail/en/5250/501-1311-ND/745102 - HQ ProgKey: http://budgetlightforum.com/node/63230 - - Ratus' guide: https://redd.it/8g5l5w (prices checked 2018-05-01) - - Store A: About $4.20 shipped - https://www.aliexpress.com/item/USB-ISP-Programmer-for-ATMEL-AVR-ATMega-ATTiny-51-AVR-Board-ISP-Downloader/32699341177.html - https://www.aliexpress.com/item/WAVGAT-Programmer-Testing-Clip-SOP8-SOP-SOIC-8-SOIC8-DIP8-DIP-8-Pin-IC-Test-Clamp/32827794024.html - https://www.aliexpress.com/item/40Pin-20CM-2-54MM-Row-Female-to-Female-F-F-Dupont-Cable-Breadboard-Jumper-Wire-for/32822958653.html - - Store B: About $4.18 shipped: - https://www.aliexpress.com/store/product/1pcs-New-USBASP-USBISP-AVR-Programmer-USB-ISP-USB-ASP-ATMEGA8-ATMEGA128-Support-Win7-64K/1171090_32809542958.html - https://www.aliexpress.com/store/product/Free-shipping-Programmer-Testing-Clip-SOP8-SOP-SOIC-8-SOIC8-DIP8-DIP-8-Pin-IC-Test/1171090_32402561848.html - https://www.aliexpress.com/store/product/20pcs-20cm-2-54mm-1p-1p-Pin-Female-to-Female-Color-Breadboard-Cable-Jump-Wire-Jumper/1171090_32628811461.html - -For Windows / MacOS users, these links may be useful: - - Oweban's guides: (Windows 10, MacOS X) (not generic, focuses on Anduril) - - http://budgetlightforum.com/node/73487 - - Hoop's guide: - - http://budgetlightforum.com/node/36216 - - Comfychair's guide: - - http://budgetlightforum.com/node/29081 - - WarHawk-AVG's guide: - - http://budgetlightforum.com/node/29684 - - Getting a USBasp to work in Windows: - - http://rayshobby.net/dead-simple-driver-installation-for-usbasp-and-usbtiny-on-windows/ - http://www.protostack.com/accessories/usbasp-avr-programmer - -To set up an attiny dev environment on Ubuntu (13.10): - - sudo apt-get install flex byacc bison gcc libusb-dev libc6-dev - sudo apt-get install gcc-avr avr-libc binutils-avr - sudo apt-get install avrdude avrdude-doc - - Optional: (make avrdude usable by non-root users, is a security risk) - sudo chmod u+s $(which avrdude) - -To set up an attiny dev environment on Fedora (30): - - sudo dnf install flex byacc bison gcc libusb libusb-devel glibc-devel - sudo dnf install avr-gcc avr-libc avr-binutils - sudo dnf install avrdude - -Building/installing attiny dev tools on other UNIX systems (in general): - - http://www.ladyada.net/learn/avr/setup-unix.html - -After wiring everything up, this tests the connection to the ATTINY13A chip: - - avrdude -p t13 -c usbasp -n - (you may need to put 'sudo' in front, on UNIX systems... - or set the suid bit on the avrdude binary, which is convenient but a - potential security risk) - -To test if you can flash firmware correctly, or to restore a light to something -like a default state, try flashing the NLITE driver from DrJones. It's similar -to the default nanjg / qlite firmware, but better. - - ./bin/flash-tiny13.sh DrJones/NLITE/nlite.hex - -For a quick test to make sure your tool chain works and your flashing tools -are working, try the 'hello world' program: - - cd hello_world - make - make flash - -If that works, you should be ready to start making changes to the code, or -flashing any of the pre-built firmwares. - -Most projects can be compiled with the bin/build.sh script. For example, to -build Crescendo for an attiny25-based driver and then flash it: - - cd ToyKeeper/crescendo - ../../bin/build.sh 25 crescendo - ../../bin/flash-tiny25.sh crescendo.hex - -Other useful tools are in bin/ too, so they might be worth a look. - - -ATtiny Series 1 (tiny1616) Support -================================== - -In Feb 2022, avr-libc merged in new devices from Atmel's DFP (Device Family -Pack). Depending on how recent your avr-libc package is, support may already -be included. If not, the info below applies: - -As of early 2021, the Debian packages for gcc-avr and avrdude do not include -support for the Tiny1 series chips. Extra steps are required to get these -working. - - - Download the Atmel ATtiny Series Device Support pack: - http://packs.download.atmel.com/ - - - Unzip the pack somewhere on your build computer - - - Set ATTINY_DFP=/path/to/where/you/unzipped/the/pack - (either in your shell, or in this repo's bin/build.sh script) - - export ATTINY_DFP=$HOME/src/torches/atmel/attiny-dfp - - - Make sure you're using gcc-avr 1:5.4.0+Atmel3.6.2 or newer. - 3.6.1 will not work. It gives errors like: - /usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x80381e of anduril.elf section `.data' is not within region `data' - This requires debian/bullseye or newer; buster has 3.6.1. - -This should at least allow the code to compile. - -Flashing: - -PyMCUProg - -The recommended solution is to use pymcuprog instead of avrdude. Details are -still being worked out for how to actually set this up though. - -AvrDude - -Some extra steps are also needed to make flashing (avrdude) work: - - - Get an AVR jtag2 device. - The one I'm using is: "HWAYEH AVR JTAG ICE Version 2.0" - Connect the cables: - - GND = - - - Vtref = + - - nSRST = R (reset/UPDI) - - - Flash the jtag2 device with the relevant firmware: - https://github.com/ElTangas/jtag2updi/tree/master/tools/avrjtagicev2 - - - Get an avrdude.conf which supports jtag2updi: - - - Download avrdude.conf from https://github.com/ElTangas/jtag2updi - and put it in /etc - - - Or grab the source and set an environment variable: - - cd ~/src/torches/avrdude - git clone https://github.com/ElTangas/jtag2updi - export AVRDUDE_CONF="-C$HOME/src/torches/avrdude/jtag2updi/avrdude.conf" - - - Maybe configure which USB serial port to use too: - export AVRDUDE_TTYUSB="/dev/ttyUSB2" - -Afterward, flashing should work. You may need to unplug and replug the jtag2 -USB device between uses though, since it may stop responding after each use. diff --git a/README.md b/README.md index 8d6f877..315395f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,92 @@ # Anduril Flashlight Firmware + FSM Flashlight UI Toolkit -Anduril is a user interface for flashlights, written on top of FSM (F-word -Spaghetti Monster), a UI toolkit for flashlights. +Anduril is a user interface for flashlights. It is written with FSM, a UI +toolkit for flashlights. -## Flashing +What is FSM? The "SM" means "Spaghetti Monster", and the "F" can be any F word +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 +to use it are: + + - Click for on/off + - Hold to change brightness + +For more in-depth use, read its [user manual](docs/anduril-manual.txt) +for full details. + +If you want to know what changed recently, check the [ChangeLog](ChangeLog.md). + +## Flashing Firmware + +Get the latest updates by flashing new firmware! + +A few things are needed to flash firmware: + + - A firmware ".hex" file. Here's + [how to find the right .hex file](docs/which-hex-file.md). + + - A flashing adapter. The type of adapter depends on which MCU chip your + light uses. It may be an UPDI 3-pin adapter (attiny1616 and newer) or an + AVR ISP 6-pin adapter (attiny85, attiny1634). + + **UPDI** typically uses a "pogo pin" adapter, with spring-loaded pins to + hold against copper pads on the driver circuit. + + **AVR ISP** typically has two parts -- a USB device (like a USBASP), and a + physical adapter (like a pogo pin adapter or SOIC8 clip). SOIC8 is the + least convenient, and is mostly only used on old models with attiny85 + chips. + + - A firmware flashing program. A few compatible programs include + `avrdude`, `pymcuprog`, and `ZFlasher`. + + - A computer or phone. Almost any modern computer or phone should be able to + do it, as long as you can plug the adapter in and run a flashing program. + +One particularly useful guide is at https://anduril.click/ . ## Compiling +The firmware can be deeply customized by modifying it and compiling your own +versions, and this is encouraged. + +To compile the firmware, it is strongly recommended that you use a Linux +computer, ideally running Debian or Ubuntu (but almost any distro should work). +Virtual machines work well, such as running WSL inside Windows. There is also +a Docker container available (TODO: add link(s) here), if that is more +convenient. + +### Prerequisites: + + - AVR toolchain packages: + `sudo apt install gcc-avr avr-libc binutils-avr avrdude` + + - One or more Atmel DFPs (Device Family Pack) may be needed, to add support + for recent AVR MCUs. + + - Download the Atmel ATtiny Series Device Support pack: + http://packs.download.atmel.com/ + + - Unzip the pack somewhere on your build computer + + - Set ATTINY_DFP=/path/to/where/you/unzipped/the/pack + (either in your shell, or in this repo's bin/build.sh script) + + `export ATTINY_DFP=$HOME/src/torches/atmel/attiny-dfp` + +### Building + +Use the `make` script included in this repo. Run `./make --help` for details +about how to use it. In most cases though, you should be able to just run +`./make` by itself to compile all available build targets. Or give it a search +term to limit builds to only a few, like `./make d4v2` to build all Emisar D4v2 +firmwares. + +The compiled firmware goes into the `hex/` directory, ready to be used by any +firmware flashing program. + diff --git a/docs/README.old.from-bzr-repo.txt b/docs/README.old.from-bzr-repo.txt new file mode 100644 index 0000000..a8118f7 --- /dev/null +++ b/docs/README.old.from-bzr-repo.txt @@ -0,0 +1,184 @@ +ToyKeeper's flashlight firmware repository +========================================== + +This is a collection of firmware for flashlights or torches, mostly +collected from BLF (http://budgetlightforum.com/). It's collected +here mostly for convenience, and to provide bug tracking and revision +control services for the code. + +See the INDEX file to find out which projects might be relevant to +your needs. + + +Getting Started +=============== + +The central firmware thread on BLF is here: + + http://budgetlightforum.com/node/38364 + +A general overview of what you need to get going is here: + + http://flashlightwiki.com/AVR_Drivers + +Some useful hardware for flashing firmware: + + What TK uses: + + http://www.fasttech.com/product/1002900-atmega-attiny-51-avr-isp-usbasp-usb-programmer + http://www.fasttech.com/product/1011800-40-pin-splittable-ribbon-cable-20cm + http://www.digikey.com/product-detail/en/5250/501-1311-ND/745102 + HQ ProgKey: http://budgetlightforum.com/node/63230 + + Ratus' guide: https://redd.it/8g5l5w (prices checked 2018-05-01) + + Store A: About $4.20 shipped + https://www.aliexpress.com/item/USB-ISP-Programmer-for-ATMEL-AVR-ATMega-ATTiny-51-AVR-Board-ISP-Downloader/32699341177.html + https://www.aliexpress.com/item/WAVGAT-Programmer-Testing-Clip-SOP8-SOP-SOIC-8-SOIC8-DIP8-DIP-8-Pin-IC-Test-Clamp/32827794024.html + https://www.aliexpress.com/item/40Pin-20CM-2-54MM-Row-Female-to-Female-F-F-Dupont-Cable-Breadboard-Jumper-Wire-for/32822958653.html + + Store B: About $4.18 shipped: + https://www.aliexpress.com/store/product/1pcs-New-USBASP-USBISP-AVR-Programmer-USB-ISP-USB-ASP-ATMEGA8-ATMEGA128-Support-Win7-64K/1171090_32809542958.html + https://www.aliexpress.com/store/product/Free-shipping-Programmer-Testing-Clip-SOP8-SOP-SOIC-8-SOIC8-DIP8-DIP-8-Pin-IC-Test/1171090_32402561848.html + https://www.aliexpress.com/store/product/20pcs-20cm-2-54mm-1p-1p-Pin-Female-to-Female-Color-Breadboard-Cable-Jump-Wire-Jumper/1171090_32628811461.html + +For Windows / MacOS users, these links may be useful: + + Oweban's guides: (Windows 10, MacOS X) (not generic, focuses on Anduril) + + http://budgetlightforum.com/node/73487 + + Hoop's guide: + + http://budgetlightforum.com/node/36216 + + Comfychair's guide: + + http://budgetlightforum.com/node/29081 + + WarHawk-AVG's guide: + + http://budgetlightforum.com/node/29684 + + Getting a USBasp to work in Windows: + + http://rayshobby.net/dead-simple-driver-installation-for-usbasp-and-usbtiny-on-windows/ + http://www.protostack.com/accessories/usbasp-avr-programmer + +To set up an attiny dev environment on Ubuntu (13.10): + + sudo apt-get install flex byacc bison gcc libusb-dev libc6-dev + sudo apt-get install gcc-avr avr-libc binutils-avr + sudo apt-get install avrdude avrdude-doc + + Optional: (make avrdude usable by non-root users, is a security risk) + sudo chmod u+s $(which avrdude) + +To set up an attiny dev environment on Fedora (30): + + sudo dnf install flex byacc bison gcc libusb libusb-devel glibc-devel + sudo dnf install avr-gcc avr-libc avr-binutils + sudo dnf install avrdude + +Building/installing attiny dev tools on other UNIX systems (in general): + + http://www.ladyada.net/learn/avr/setup-unix.html + +After wiring everything up, this tests the connection to the ATTINY13A chip: + + avrdude -p t13 -c usbasp -n + (you may need to put 'sudo' in front, on UNIX systems... + or set the suid bit on the avrdude binary, which is convenient but a + potential security risk) + +To test if you can flash firmware correctly, or to restore a light to something +like a default state, try flashing the NLITE driver from DrJones. It's similar +to the default nanjg / qlite firmware, but better. + + ./bin/flash-tiny13.sh DrJones/NLITE/nlite.hex + +For a quick test to make sure your tool chain works and your flashing tools +are working, try the 'hello world' program: + + cd hello_world + make + make flash + +If that works, you should be ready to start making changes to the code, or +flashing any of the pre-built firmwares. + +Most projects can be compiled with the bin/build.sh script. For example, to +build Crescendo for an attiny25-based driver and then flash it: + + cd ToyKeeper/crescendo + ../../bin/build.sh 25 crescendo + ../../bin/flash-tiny25.sh crescendo.hex + +Other useful tools are in bin/ too, so they might be worth a look. + + +ATtiny Series 1 (tiny1616) Support +================================== + +In Feb 2022, avr-libc merged in new devices from Atmel's DFP (Device Family +Pack). Depending on how recent your avr-libc package is, support may already +be included. If not, the info below applies: + +As of early 2021, the Debian packages for gcc-avr and avrdude do not include +support for the Tiny1 series chips. Extra steps are required to get these +working. + + - Download the Atmel ATtiny Series Device Support pack: + http://packs.download.atmel.com/ + + - Unzip the pack somewhere on your build computer + + - Set ATTINY_DFP=/path/to/where/you/unzipped/the/pack + (either in your shell, or in this repo's bin/build.sh script) + + export ATTINY_DFP=$HOME/src/torches/atmel/attiny-dfp + + - Make sure you're using gcc-avr 1:5.4.0+Atmel3.6.2 or newer. + 3.6.1 will not work. It gives errors like: + /usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x80381e of anduril.elf section `.data' is not within region `data' + This requires debian/bullseye or newer; buster has 3.6.1. + +This should at least allow the code to compile. + +Flashing: + +PyMCUProg + +The recommended solution is to use pymcuprog instead of avrdude. Details are +still being worked out for how to actually set this up though. + +AvrDude + +Some extra steps are also needed to make flashing (avrdude) work: + + - Get an AVR jtag2 device. + The one I'm using is: "HWAYEH AVR JTAG ICE Version 2.0" + Connect the cables: + - GND = - + - Vtref = + + - nSRST = R (reset/UPDI) + + - Flash the jtag2 device with the relevant firmware: + https://github.com/ElTangas/jtag2updi/tree/master/tools/avrjtagicev2 + + - Get an avrdude.conf which supports jtag2updi: + + - Download avrdude.conf from https://github.com/ElTangas/jtag2updi + and put it in /etc + + - Or grab the source and set an environment variable: + + cd ~/src/torches/avrdude + git clone https://github.com/ElTangas/jtag2updi + export AVRDUDE_CONF="-C$HOME/src/torches/avrdude/jtag2updi/avrdude.conf" + + - Maybe configure which USB serial port to use too: + export AVRDUDE_TTYUSB="/dev/ttyUSB2" + +Afterward, flashing should work. You may need to unplug and replug the jtag2 +USB device between uses though, since it may stop responding after each use. diff --git a/docs/which-hex-file.md b/docs/which-hex-file.md index 380cff9..88cc1d2 100644 --- a/docs/which-hex-file.md +++ b/docs/which-hex-file.md @@ -1,12 +1,13 @@ # How to figure out which .hex file to use 1. Use the version check function (15 or more clicks from Off) to find out - which flavor of the firmware the light has installed. WRITE THIS DOWN. + which flavor of the firmware the light has installed. + **WRITE THIS DOWN.** -2. Look up the model number in the MODELS file, to get the name and MCU type: +2. Look up the model number in the MODELS file, to get the name and MCU type: https://toykeeper.net/torches/fsm/anduril2/MODELS -3. Find the newest firmware for that model. +3. Find the newest firmware for that model. https://toykeeper.net/torches/fsm/anduril2/?C=M;O=D If the version doesn't include a model number, you may be able to find @@ -20,20 +21,20 @@ the model in the PRODUCTS file to see which version it probably uses: The Version Check function should blink out a series of numbers in one of several formats: - - NNNN-YYYY-MM-DD - Anduril 2 from 2023-05 or later. + - `NNNN-YYYY-MM-DD` + Anduril 2 from 2023-05 or later. It's a model number and build date, with "buzz" flashes between sections. - NNNN: model number - YYYY: year - MM: month - DD: day + - `NNNN`: model number + - `YYYY`: year + - `MM`: month + - `DD`: day - - YYYYMMDDNNNN - Anduril 2 from 2023-05 or earlier. + - `YYYYMMDDNNNN` + Anduril 2 from 2023-05 or earlier. It's a build date and model number. - - YYYYMMDD - This is an old Anduril 1 version. It's just a build date. +- `YYYYMMDD` + This is an old Anduril 1 version. It's just a build date. If the model name isn't obvious, try looking it up in the PRODUCTS file. diff --git a/make b/make index 2221ffe..40fc398 100755 --- a/make +++ b/make @@ -26,6 +26,7 @@ Usage: ./make TASK todo Show tasks noted in source code files models Generate the MODELS file release Zip up all .hex files to prep for publishing a release + docs Convert all .md files to .html ... or TASK can be the partial name of a build target. @@ -55,6 +56,9 @@ function main() { echo 'rm -vf **/*.hex **/*~ **/*.elf **/*.o **/*.cpp' rm -vf **/*.hex **/*~ **/*.elf **/*.o **/*.cpp ;; + docs) + make-docs + ;; flash) echo "Not implemented yet." #./bin/flash.sh "$@" @@ -75,5 +79,13 @@ function main() { esac } +function make-docs () { + for md in **/*.md ; do + echo "$md" + html=$(echo "$md" | sed 's/.md$/.html/') + cmark-gfm "$md" > "$html" + done +} + main "$@" diff --git a/ui/rampingios/rampingios-v3.html b/ui/rampingios/rampingios-v3.html deleted file mode 100644 index f72d1ec..0000000 --- a/ui/rampingios/rampingios-v3.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - - RampingIOS V3 Manual :: Phil! Gold - - - - - - - - - - - - - - - - - - - -
-

Tue, 28 Aug 2018

- -
-

RampingIOS V3 Manual

- -
- -

- - - - -
RampingIOS V3 UI diagram
-

- -

The Emisar D4S flashlights use a firmware named RampingIOS -V3. (The Emisar D4, D1, and D1S -all use RampingIOS V2.) There's not really a manual; the -only thing we get is the diagram on the right. It's reasonably -comprehensive, but there's a fair amount of detail it merely summarizes, -so I thought a textual manual would be nice.

- -

The Emisar D4S only works when the head and tailcap are tightened fully. -You can physically lock it out--prevent it from turning on -accidentally--by simply loosening the tailcap a small amount. A quarter -turn will do it.

- -

Emisar lights are known for their ramping interfaces. Rather than have a -small number of distinct brightness levels, they can vary their brightness -anywhere between their lowest and highest levels, like a light on a -dimmer. The D4S is in ramping mode by default, but it also has a stepped -mode that can be configured to be closer to how non-ramping lights work.

- -

Each mode--ramping and stepped--can have differently-configured brightness -floors and ceilings.

- -

The driver for the D4S has two different chipsets. At low brightness -levels, a fairly-efficient but low-power chipset (called a 7135) is -used. These lowest brightness levels are called the "regulated levels". -Each regulated level will always be the same brightness regardless of how -much charge the battery has. Above a particular brightness level, the -light switches over to a less-efficient but high-power chipset (called a -FET). These levels are called "direct-drive". The brightness of the -direct-drive levels is directly related to the battery's charge level; the -more charged the battery, the brighter the levels. The light is at its -most efficient, in terms of power used for every lumen generated, at the -brightest regulated level. When the light is first powered by tightening -the tailcap, it will default to this level.

- -

At higher brightness levels, the light's LEDs generate a lot of heat. If -the light exceeds its configured maximum temperature, it will begin -dimming itself automatically until the temperature drops below the allowed -maximum.

- -

The D4S has a set of cyan-colored auxiliary LEDs that can be on when the -main LEDs are off. You can configure the behavior of the aux LEDs.

- -

Basic Usage

- -

The default mode for the light is ramping mode. Triple-pressing the -button (3 clicks) while the light is on will toggle between ramping -and stepped mode.

- -

While the light is off, press and release the button (1 click) to turn -it on. It will turn on at the last-used brightness level. (This is -called "mode memory".) Immediately after loosening and tightening the -tailcap (or after changing the battery), the memorized level will be the -light's max regulated level.

- -

When the light is on, 1 click will turn it off. The current brightness -level will be memorized for future use. There's a fraction of a second -delay between pressing the button and the light actually turning off. -That's because of the way the light processes input; it's waiting to make -sure you're only going to press the button once (since multiple presses -will trigger other actions).

- -

When the light is on, holding the button down will brighten the light. In -ramping mode, the brightness will increase gradually ("ramping up"). In -stepped mode, the light will jump through increasing brightness levels. -If you press, release, and then hold the button, it will begin dimming. -In ramping mode, the brightness will decrease gradually ("ramping -down"). In stepped mode, the light will jump through decreasing -brightness levels. While the light is changing, if you release the button -and immediately hold it again, the direction (dimming or brightening) will -switch.

- -

In ramping mode, while the light is ramping, it'll briefly blink off and -on again at two different brightness levels: the maximum regulated level -and the brightness ceiling.

- -

While the light is off, double-pressing the button (2 clicks) will -immediately jump to the brightness ceiling.

- -

While the light is on, 2 clicks will jump to the maximum brightness -level, regardless of the configured brightness ceiling. Another two -clicks will go back to the previous brightness level.

- -

While the light is off, if you hold the button the light will turn on at -its lowest level. If you continue holding the button, the light will -begin brightening from there.

- -
Configuration Menus
- -

The light has several different configuration modes. Each of those modes -works more or less the same way. The mode will have a series of menu -items that it will go through. For each menu item, the light will first -blink a number of times corresponding to the item number (first, second, -etc.) After that, the light will begin fluttering on and off fairly -quickly. While the light is fluttering, you can click the button a number -of times; the light will count the number of button presses and use that -number as its new configuration for that menu item. After a short period -of time, the fluttering will stop and the light will move on to the next -menu item. After the light has gone through all of the menu items, it -will return to whatever mode it was in before entering the configuration -mode.

- -

If you don't press the button during a particular menu item's fluttering, -that item will remain unchanged.

- -
Configuring the Basic Modes
- -

While the light is on, 4 clicks will enter ramping or stepped -configuration mode, depending on which mode the light was in before the 4 -clicks.

- -

For ramping mode, there are two menu options:

- -
    -
  1. Brightness floor (default 1/150)
  2. -
  3. Brightness ceiling (default 150/150)
  4. -
- -

During the floor configuration, press the button equal to the number of -ramping levels (out of 150) at which the floor should be. To set the -lowest possible floor, click the button once.

- -

The ceiling is configured similarly, but you press the button equal to the -number of steps away from maximum brightness. To set the highest possible -ceiling (at max brightness), click the button once.

- -

For stepped mode, there are three menu options:

- -
    -
  1. Brightness floor (default 20/150)
  2. -
  3. Brightness ceiling (default 120/150)
  4. -
  5. Number of steps (default 7)
  6. -
- -

Other Modes

- -

The other modes largely involve multiple clicks from off. Most of them -are not generally needed for everyday use, but they supplement the light's -basic operations.

- -
BattCheck/TempCheck Modes
- -

From off, 3 clicks will enter "BattCheck" mode, which blinks out the -current battery voltage. First it blinks the number of volts, then it -pauses, then it blinks out the tenths of volts. Thus, if the battery were -at 3.5 volts, the light would blink three times, pause, then five times. -For zeroes, it gives a very short blink.

- -

A fully-charged lithium-ion battery is 4.2 volts. The light considers 2.8 -volts to be an empty battery and won't turn on if the battery is at or -below 2.8 volts.

- -

The voltage sequence will continue blinking until you turn off the light -with a single click.

- -

While the light is in BattCheck mode, 2 clicks will enter TempCheck -mode. Instead of blinking out the battery voltage, the light will start -blinking out its current temperature in degrees Celsius, first the tens -digit then the units digit. Like BattCheck mode, the light will continue -blinking out the temperature until you turn it off with a single click.

- -

While the light is in TempCheck mode, 4 clicks will enter thermal -configuration mode. See the thermal configuration mode documentation -below for how that works.

- -
Tactical Mode
- -

From off, 4 clicks will enter "tactical" or "momentary" mode. The -light will flash once to show that it's entered the mode. The auxiliary -LEDs will turn off (if they were on). In tactical mode, the light will -turn on at its memorized brightness for as long as the button is being -held down. It will turn off as soon as the button is released.

- -

There's no button press combination that will exit tactical mode. To exit -it, you will have to partially unscrew and retighten the tailcap.

- -
Lockout Mode
- -

From off, 6 clicks will enter lockout mode. The light will flash -twice to show that it's entered the mode. There's a separate aux LED mode -for lockout mode, so you can tell whether the light is in lockout or not.

- -

In lockout mode, pressing the button will turn on the light at its lowest -brightness ("moonlight mode") for as long as the button is held down.

- -

Another 6 clicks will exit lockout mode. The light will flash twice to -show that it's left the mode.

- -

While in lockout mode, 3 clicks will cycle through the various -settings for the aux LEDs in lockout mode. The four modes are, in order: -low, high, blink (on high), and off. The default mode is blink.

- -

Remember that loosening the tailcap a quarter turn will also lock out the -light. Using the 6 clicks is called "electronic lockout", while turning -the tailcap is "physical lockout".

- -
Aux LED Configuration
- -

From off, 7 clicks will cycle to the next aux LED mode. The four -modes are, in order: low, high, blink (on high), and off. The default -mode is low.

- -
Beacon Mode
- -

From off, 8 clicks will enter beacon mode. In beacon mode, the light -will blink on and off every few seconds.

- -

By default, the light will blink every two seconds. To change the timing, -use 4 clicks while in beacon mode. The light will enter a one-item -menu. During the flickering for input, press the button a number of times -equal to the number of seconds between blinks.

- -

1 click will exit beacon mode.

- -
Thermal Configuration Mode
- -

From off, 10 clicks will enter thermal configuration mode.

- -

The menu items here are:

- -
    -
  1. Current temperature (every click is one degree Celsius)
  2. -
  3. Temperature ceiling (every click is one degree above 30°C)
  4. -
- -

The "current temperature" item can be used to adjust the calibration of -the light's temperature sensor. To use it, make sure the light has been -off long enough that all of its components have cooled (or warmed) to the -ambient temperature. Check the ambient temperature using a thermometer -you trust. Go to thermal configuration mode, and enter the current -temperature by clicking the button a number of times equal to the -temperature in degrees Celsius. (If it's 22°C, click the button 22 -times.)

- -

You can check the default calibration by entering TempCheck mode from a -room-temperature light. The D4Ss are supposed to go through a temperature -calibration at the factory, so hopefully most of them won't need manual -thermal calibration.

- -

The temperature ceiling is simply the highest temperature the light should -be allowed to reach. Once it hits its temperature ceiling, it will -progressively dim itself until the temperature stabilizes below the -ceiling. Note that the number of clicks in that menu option is added to -30 to reach the actual ceiling. (Thus, you can't set a ceiling below -31°C.) The maximum allowed ceiling is 70°C.

- -

The default temperature ceiling is 45°C.

- - -
- - - -

-
Phil! Gold
- - - - -- cgit v1.2.3