Flashlight Firmware Repository

2239 posts / 0 new
Last post
trakcon
trakcon's picture
Online
Last seen: 12 min 35 sec ago
Joined: 01/23/2019 - 15:50
Posts: 361
Agro wrote:
trakcon wrote:
These are the latest builds from the development (not always fully tested) branch. I haven’t had any issues with the newest build on my D4V2 Ti.
Thanks, that’s exactly what I was looking for. Thumbs Up
Big Smile
D'AVerk
Offline
Last seen: 5 months 1 week ago
Joined: 09/05/2018 - 07:48
Posts: 109
Location: Russia

In this beautiful software there are one awful thing.
Every time, when i am going to check voltage, if i shutdown flashlight on high level, i get huge preflash during 3 short click. And because moonlight not remembered – even if i firstly switch on by hold on moonlight and off then – huge preflash would appear.

It would be essential, if software d’t turn immediatly on memory level after first click. Just moonlight for first 0.1-0.2 sec and only after – turn back to memorized level. So, if we do many clicks – as for voltage check, software would catch next click before turning power up to memorized level.

Agro
Agro's picture
Online
Last seen: 1 min 23 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6296
Location: Ślōnsk

I use gentoo on my dev machine. I just got a notice that bzr will be removed from the package repo in 30 days because it requires Python 2. They recommend that I switch to breezy.

d_t_a
Offline
Last seen: 15 hours 56 min ago
Joined: 08/04/2017 - 23:58
Posts: 2094
Location: Manila, Philippines

D'AVerk wrote:
In this beautiful software there are one awful thing.
Every time, when i am going to check voltage, if i shutdown flashlight on high level, i get huge preflash during 3 short click. And because moonlight not remembered – even if i firstly switch on by hold on moonlight and off then – huge preflash would appear.

It would be essential, if software d’t turn immediatly on memory level after first click. Just moonlight for first 0.1-0.2 sec and only after – turn back to memorized level. So, if we do many clicks – as for voltage check, software would catch next click before turning power up to memorized level.

Seems to be a worthy change if possible. I usually don’t turn off from High, so maybe I don’t encounter it often, but I’ve encountered this (bright pre-flash) when doing the triple-click battery check.

SammysHP
SammysHP's picture
Online
Last seen: 3 min 53 sec ago
Joined: 06/25/2019 - 14:35
Posts: 566
Location: Germany

Agro wrote:
I use gentoo on my dev machine. I just got a notice that bzr will be removed from the package repo in 30 days because it requires Python 2. They recommend that I switch to breezy.

I use breezy for months already, works great. The multi backend support (bazaar and git) is nice. Much better than fast-export. But for me it’s still just a bridge between bazaar and git. Wink
Tom E
Tom E's picture
Offline
Last seen: 4 hours 15 min ago
Joined: 08/19/2012 - 08:23
Posts: 13552
Location: LI NY

d_t_a wrote:
D'AVerk wrote:
In this beautiful software there are one awful thing. Every time, when i am going to check voltage, if i shutdown flashlight on high level, i get huge preflash during 3 short click. And because moonlight not remembered - even if i firstly switch on by hold on moonlight and off then - huge preflash would appear. It would be essential, if software d't turn immediatly on memory level after first click. Just moonlight for first 0.1-0.2 sec and only after - turn back to memorized level. So, if we do many clicks - as for voltage check, software would catch next click before turning power up to memorized level.
Seems to be a worthy change if possible. I usually don't turn off from High, so maybe I don't encounter it often, but I've encountered this (bright pre-flash) when doing the triple-click battery check.

Not sure of the solution would be more painful than the problem. I do agree it's annoying - happens to me all the time, but adding the delay to the basic click ON - I dunno...

ChibiM
ChibiM's picture
Offline
Last seen: 1 day 9 hours ago
Joined: 05/09/2011 - 10:25
Posts: 6442
Location: Holland

Just a quick question: I assume all flashlights have slightly different coding? So I can't just adjust 1 code and upload it to several Anduril lights I own, for example: Noctigon D18, Lumintop FW3A etc. 

 

Actually I have a second question, when I go to this overview: https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/ToyKeeper

I'm trying to download but get errors each time. 

Chatika vas Paus
Chatika vas Paus's picture
Offline
Last seen: 1 hour 44 min ago
Joined: 09/03/2017 - 13:46
Posts: 911
ChibiM wrote:
Just a quick question: I assume all flashlights have slightly different coding? So I can’t just adjust 1 code and upload it to several Anduril lights I own, for example: Noctigon D18, Lumintop FW3A etc.

Anduril has separate files for several more popular flashlights. They usually differ in the number of pwm outputs, auxes, button illumination, “maximum power” and temperature, or smaller “BLINK_AT_RAMP_MIDDLE” settings.
But if you are sure that the driver has the same structure and flashlights have the same functionality then one file should be enough.

ChibiM wrote:
Actually I have a second question, when I go to this overview: https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/ToyKeeper I’m trying to download but get errors each time. 

TK seems to be trying to refresh the entire library. Check this thread.
At this link you will download (probably) the latest version (482). (Whole repository).

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 days 15 hours ago
Joined: 01/12/2013 - 14:40
Posts: 10621
Location: (469219) 2016 HO3
Agro wrote:
I use gentoo on my dev machine. I just got a notice that bzr will be removed from the package repo in 30 days because it requires Python 2. They recommend that I switch to breezy.

Long story short… bzr (bazaar) has become brz (breezy).

Longer version: Most of bzr’s development was funded by Canonical, and the company’s entire development process was built on bzr and Launchpad. Around 2010, the company changed priorities from a community-first approach to a profit-based approach. Lots of things changed over the years, and development for Launchpad and bzr was scaled back to just a few people. They also started adding support for Git, and some of the newer developers switched to GitHub instead of using the company’s own system. In 2017, after several failed attempts at profitable projects, the company laid off most of its developers. Soon after, some of the original bzr devs then continued to work on bzr in their own time, but renamed it to brz to signal a new direction… and they were much more free to do what they wanted with it. It was a labor of love again, not tied to a company. The original bzr is effectively dead, replaced by brz.

Tom E wrote:

d_t_a wrote:
D'AVerk wrote:
huge preflash during 3 short click. … Just moonlight for first 0.1-0.2 sec and only after – turn back to memorized level.

(bright pre-flash) when doing the triple-click battery check.

Not sure of the solution would be more painful than the problem. I do agree it’s annoying – happens to me all the time, but adding the delay to the basic click ON – I dunno…

Yeah, prioritizing the path to battcheck would mean adding a delay at each normal activation… so it seems like spending $20 to save $5.

However, there are two ways to solve it… the user could build a customized verison with “B_TIMING_ON” set to “B_TIMEOUT_T” to make it wait until inputs are fully resolved before responding. Or if a “soft start” is ever added, that might reduce the pre-flash too.

I tried adding a soft start once though, and it added a lot of complication and potential for bugs, since it didn’t react well to being interrupted. But perhaps I could try again after doing some refactoring.

ChibiM wrote:
all flashlights have slightly different coding? So I can’t just adjust 1 code and upload it to several Anduril lights I own, for example: Noctigon D18, Lumintop FW3A etc.

The code is structured to make the hardware details and UI details separate. If you change the UI, it generally should work on each supported device… and if you change the code for a supported device, it generally won’t affect the UI or any other devices.

For the most part, the code for each specific device is limited to only a hardware definition file (MCU pinouts, hardware features) and a UI config file (ramp shape, interface options). The rest is shared across all devices.

It’s very similar to how a regular computer works… there is an operating system and there are applications. But in this case, there’s a microkernel and a user interface… and they’re compiled into a single file to save space.

After making UI changes, it’s normally recommended to run “make”, which builds the firmware for every supported device. Then match up the .hex files with the devices you want to flash.

ChibiM wrote:
when I go to this overview:
https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/ToyKeeper

I’m trying to download but get errors each time.

That should be resolved very soon. A bug popped up in Launchpad a couple days ago, I reported it yesterday, and a fix was committed today. So it should be in the next site update, and the updates happen frequently.

(edit: it’s fixed now)

Agro
Agro's picture
Online
Last seen: 1 min 23 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6296
Location: Ślōnsk

Thank you for the story ToyKeeper. I’ll switch to brz then.

flucero28
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/24/2012 - 11:24
Posts: 46
Location: New Mexico

Hoping someone can help me. Pulling my hair out.

I’m trying to make a small change to the dragon low color output. I want it lower.

So I change it from this:

// THESE VALUES ARE USED FOR EASY LEVEL CHANGING INSTEAD OF USING THE RAMP
#define RAMP_SIZE 8
#define RAMP_7135 *25*,255,0,0,0,0,0,0
#define RAMP_FET 0,0,1,15,40,90,140,255

To this: (25 to 10 for first value)

// THESE VALUES ARE USED FOR EASY LEVEL CHANGING INSTEAD OF USING THE RAMP
#define RAMP_SIZE 8
#define RAMP_7135 *10*,255,0,0,0,0,0,0
#define RAMP_FET 0,0,1,15,40,90,140,255

It builds fine in atmel studio. It flashes to the attiny25 on the board no problem.

However, the brightness level does not change. I have tried flashing many times, no affect. What am I doing wrong or not doing correctly?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 2 days 15 hours ago
Joined: 01/12/2013 - 14:40
Posts: 10621
Location: (469219) 2016 HO3

flucero28 wrote:
I’m trying to make a small change to the dragon low color output. I want it lower.

So I change it from … 25 to 10 for first value …

However, the brightness level does not change. I have tried flashing many times, no affect. What am I doing wrong or not doing correctly?

I’m not sure, but I recall hearing about some issues with the Dragon boards having a leaky 7135 chip which stays on even during the white modes. If you’ve got one of those, it might not be possible to lower it below a certain point.

To test it, try changing the first white mode to 0, and check if the color channel stays on.

It’s possible the white LEDs could be on at level 0 too, but that usually means it’s using fast PWM instead of phase-correct. Might be worth checking that too.

flucero28
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/24/2012 - 11:24
Posts: 46
Location: New Mexico

ToyKeeper wrote:
flucero28 wrote:
I’m trying to make a small change to the dragon low color output. I want it lower.

So I change it from … 25 to 10 for first value …

However, the brightness level does not change. I have tried flashing many times, no affect. What am I doing wrong or not doing correctly?

I’m not sure, but I recall hearing about some issues with the Dragon boards having a leaky 7135 chip which stays on even during the white modes. If you’ve got one of those, it might not be possible to lower it below a certain point.

To test it, try changing the first white mode to 0, and check if the color channel stays on.

It’s possible the white LEDs could be on at level 0 too, but that usually means it’s using fast PWM instead of phase-correct. Might be worth checking that too.

Thank you TK. I started all over from scratch in Atmel studio and it worked the first time. Must have been a glitch somewhere. Facepalm

Capital
Offline
Last seen: 1 month 3 days ago
Joined: 05/23/2018 - 16:21
Posts: 17
Location: SW Missouri

Can someone recommend an Anduril hex file for a D4V2 without the auxiliary lights?

I have a D4V2 that I’ve been swapping MCPCBs and I’m not reconnecting the aux light board. I assumed I could grab a hex file for another Anduril light without the aux lights but I’m not having any luck.

Any input would be greatly appreciated.

gchart
gchart's picture
Offline
Last seen: 10 hours 22 min ago
Joined: 03/19/2016 - 11:57
Posts: 2587
Location: Central IL

Honest question: what’s the harm with leaving the firmware as-is?

Capital
Offline
Last seen: 1 month 3 days ago
Joined: 05/23/2018 - 16:21
Posts: 17
Location: SW Missouri

I snipped the leads and just wanted to make sure they weren’t powered. Maybe I’m being too OCD?

gchart
gchart's picture
Offline
Last seen: 10 hours 22 min ago
Joined: 03/19/2016 - 11:57
Posts: 2587
Location: Central IL

Ohhhh. If you unsoldered them, there shouldn’t be any risk. Being snipped, there is a small risk yeah.

I don’t think a pre-built file would help honestly. My biggest fear would be if a wire touched the body of the flashlight (ground) causing a short. To avoid a “short” situation you’d need the aux wires to be driven low (ground) by the MCU. I’m not sure if Anduril/FSM is like this, but it’s common to set unused MCU pins to input-pullup (positive with a ~25000 Ohm internal series resistor).

When you have the aux LEDs enabled but in the “dim” setting, that is actually being used to power the LEDs: the MCU’s internal ~25000 Ohm resistors. So if you know that aux is set to “dim” and you have a loose wire touch, it wouldn’t be a true short… it’d only source about 0.17 mA (very very little).

But I think your best bet would be to unsolder the wires if you can.

Capital
Offline
Last seen: 1 month 3 days ago
Joined: 05/23/2018 - 16:21
Posts: 17
Location: SW Missouri

Great information thank you. I’ll go a step further and just unsolder the leads.

Pages