Flashlight Firmware Repository

The temp started dropping, so I just shut it off. Iā€™ll try again later. Iā€™d still like to know the answer, if someone will tell me. Is there a way out of thermal config without saving state, if ā€œwaitingā€ needs to be cut short for any reason?

What you just discovered is the reason I like andurilā€¦ Just set the thermal limit, at an exact temp, with a series of clicks.

Yeah, I saw discussion about that. It would be nice, but itā€™s not the way Narsil works, and I donā€™t have the ability to re-flash the driver. :weary:

I have a general question about the modes in the firmwares.

Iā€™ve read the code of several firmwares in the repository to understand how ā€œmultiple-clicksā€ function works for e-switches.

All of them had the same technique of counting clicks each time the button is not pressed and press-duration > 0.
So for the simplest UI of: 1 click = ON/OFF and 2-fast-clicks = TURBO :
When you double click (and the light is initially ON), first of all - the light turns OFF and then moves into TURBO mode.
Am I right or missing something?

What I donā€™t get is how do you distinguish a single click from multiple clicks? Because from what I can see, the firmwares in the repo, always run the code for 1-click, and when multiple-clicks detected, itā€™s code will run in addition to the 1-click code.

Thanks :slight_smile:

FSM solves that issue. Using this UI toolkit, it does not do the 1-click code before the 2-click code or the 3-click codeā€¦ unless you specifically tell it to.

On some FSM-based interfaces, it intentionally goes to the 1-click level before going to the 2-click level, but itā€™s not a side effect. It only does that if itā€™s instructed to do so on purpose. Otherwise itā€™ll wait until the user is done clicking before it responds. For example, the Baton clone UI demonstrates both methods.

Thanks for the reference :slight_smile:
Itā€™s an interesting implementation, ill test on my diving light soon

TK
I wanted to flash Anduril in my D4 with xpl-hi. But what does the lower muggle ceiling mean? I found it here

That was a one-off special build because someone requested a version with muggle mode limited to ~150 lm.

Thanks for this. This is exactly what I needed after I enabled some additional code in Anduril for dual switch support. I ran out of space and couldnā€™t make sense of the compile options I was missing in Atmel Studio. Now it compiles without issue!

Texas_Ace, were you ever able to suss out those problems with the GT70 style driver and Anduril? Iā€™ve been researching a lot, and trying to find a way to get Anduril onto my GT70, but am not coming up with much information unfortunately.

Are Anduril inputs and outputs assigned to the same ports as Narsil and bistroHD?
Narsil:

bistroHD:

And Anduril?

Yes

Check the individual hwdef files to see how the pins are mapped for different types of hardware:

https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/fsm/files/head:/ToyKeeper/

/* BLF GT driver layout
* ----
* Reset -|1 8|- VCC (unused)
* eswitch -|2 7|- Voltage divider
* AUX LED -|3 6|- Current control (buck level)
* GND -|4 5|- PWM (buck output on/off)

/* Emisar D4 driver layout
* ----
* Reset -|1 8|- VCC
* eswitch -|2 7|-
* AUX LED -|3 6|- PWM (FET)
* GND -|4 5|- PWM (1x7135)

/* Fireflies ROT66 driver layout
* ----
* Reset -|1 8|- VCC
* eswitch -|2 7|- optic nerve
* FET -|3 6|- 7x7135
* GND -|4 5|- 1x7135

As always very helpful. Thanks a lot!

I actually do have some experience in programming Arduinos but I am quite lost in the repository.
Could somebody point me out which files I would need to compile the code for the FW3A?

Sorry, itā€™s kinda buried. The top level of the code organization at Launchpad is branches. Normally everything is in the trunk branch, but thatā€™s treated as a place for stable code to land. Development is done elsewhere. In this case, development happens in the fsm branch, and in other branches off of that one. So the fsm branch is a better place to check for the latest updates.

Within a copy of the repository though, the top-level directories are authors, and then the next level is projects. Anduril is part of the FSM project, also known as Spaghetti Monsterā€¦ so the full path is ToyKeeper/spaghetti-monster/anduril .

Itā€™d be a good idea to branch a local copy of the whole repository, in order to get all the files and preserve the directory structure. Itā€™d also be a good idea to use the included build scripts, like typing ā€œmakeā€ in the Anduril directory. Grabbing individual files tends to lead to problems, and building it with other tools works but isnā€™t really supported.

Sometime soon I really should merge everything back into trunk. It has been a while. Iā€™m just waiting on some projects to finish first, because there are a bunch of changes which havenā€™t quite landed yet.

Thank You! I got it.
Next step ist to try to compile the code. Should not be to complicated on Linux, I think.

Compiling works now, but the code is much more complicated than I thought :weary:

Help with Launchpad and Bazaar in Windows?

If you feel that this post doesnā€™t belong here or is a repeat, politely let me know and I will move or remove it.

Scanning this thread indicates that getting the code has not been a problem for anyone else; troubles only seem to arise when trying to build or flash. Though not an expert, I can RTFM, build/compile from examples, and have a handful of programmers on hand when/if needed. Those tasks are not (yet) a problem, but getting the repo has been anything but simple for me.

I installed Bazaar standalone in Windows and added bzr to PATH.
I tried bzr branch lp:flashlight-firmware and got error saying I needed to authenticate. Thus, I went down a rabbit hole for hoursā€¦

I cannot accurately list all of the steps Iā€™ve taken to get this working as Iā€™ve forgotten the exact sequence (I did this in 2018-11), but at the very least I:

  • Signed up with Launchpad/UbuntuOne (OpenID)
  • Created/shared OpenPGP key
  • Signed Ubuntu Code of Conduct
  • Established Launchpad/UbuntuOne SSH key
  • Opened Windows command prompt:
    $ cd
    $ bzr whoami

    $ bzr launchpad-login

    $ bzr branch lp:flashlight-firmware
    Connected (version 2.0, client Twisted)
    bzr: ERROR: Connection error: Unable to authenticate to SSH host as
    @bazaar.launchpad.net
    supported auth types: [ā€˜publickeyā€™]
    $ bzr help stupidity
    bzr: ERROR: No help could be found for ā€˜stupidityā€™. Please use ā€˜bzr help topicsā€™
    to obtain a list of topics.
  • Read LaunchPad documentation
  • Read Bazaar documentation
  • Pulled out my 3 remaining hairs.

I accept that I donā€™t understand Bazaarā€™s paradigm and grok Launchpadā€™s unique implementation even less, but even this idiot should be able to download a repoā€¦

Iā€™ve done some searching and scanned dozens of pages of this thread looking for help, but so far come up short. Is there a post that Iā€™ve missed regarding the use of launchpad? Iā€™ve been using git for a long time, but only locally so Iā€™m not an expert. Iā€™ve never before needed authentication just to get a repository. I assumed that repos were freely available as read-only. I donā€™t even understand why I need an authenticated SSH key to pull a repo :person_facepalming: .

TK put this on launchpad to make it easy to get. What am a missing?