Flashlight Firmware Repository

2231 posts / 0 new
Last post
Valynor
Offline
Last seen: 1 hour 25 min ago
Joined: 07/13/2019 - 17:13
Posts: 108
Location: Germany

ToyKeeper wrote:
Valynor wrote:
blink out the version number
This is more complicated than it may seem at first. Basically, there are reasons why software has version numbers like "1:8.11+urwcyr1.0.7~pre44-4.4:amd64". But version strings long enough to uniquely identify each build are ... difficult to blink out with a single LED. It could perhaps use just the build date, which would get the version string down to 8 digits... but it wouldn't uniquely identify versions for different lights or made by different people or different branches. Maybe that'd be enough though?

 

Anything that uniquely identifies the current firmware version would be acceptable IMHO. 

Wouldn't YYYYMMDD be enough to look up the firmware in your repository?

 

I think this is an important feature to have, esp. for those who don't own a reflashing kit. If you didn't flash it yourself there's no way to know the exact firmware the light came with.

contactcr
Offline
Last seen: 1 hour 26 min ago
Joined: 05/19/2017 - 18:52
Posts: 3105
Location: US

If you have no flashing kit then you can rely on the manual. If the manual is wrong we should hold manufacturer accountable..

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

ToyKeeper wrote:
Using a similar method, yes. It could reset the automatic memory level to a default after an arbitrary timeout. This would require enabling sleep ticks on all lights though, even ones which otherwise have no need for it.

Would they be able to go to tickless sleep after all timers are expired?
SammysHP
SammysHP's picture
Online
Last seen: 13 sec ago
Joined: 06/25/2019 - 14:35
Posts: 385
Location: Germany

Not with the current framework design as it does not know when all timers are expired.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 5 hours 22 min ago
Joined: 01/12/2013 - 14:40
Posts: 10437
Location: (469219) 2016 HO3
trailhunter wrote:
How do I know what version of anduril I’m working off of ToyKeepers trunk?

Use the ‘bzr revno’ command, or a history visualization tool like ‘bzr log’ or ‘bzr qlog’. More generally, the ‘bzr help’ command has an overview of available commands and other documentation.

To make a revision number meaningful though, it’s necessary to know which branch it’s on. Like, “trunk r236” is very different than “fsm r236”. But “fsm r236” and “trunk r188.1.48” are the same thing.

trailhunter wrote:
yeah latest version pulled from trunk. I was going to use your hex files but I wanted latest stable (for any bug fixes n stuff)

Note that “stable” is usually not the same thing as “latest”. Stable is usually behind, specifically missing the latest changes.

In particular, I’d suggest using the fsm branch instead of trunk if you’re doing anything with FSM-based interfaces like Anduril. It basically serves as a stable (ish) branch where all FSM-related changes land, as opposed to trunk which is a stable branch for the entire repository… and thus farther behind.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 5 hours 22 min ago
Joined: 01/12/2013 - 14:40
Posts: 10437
Location: (469219) 2016 HO3
Valynor wrote:
Wouldn’t YYYYMMDD be enough to look up the firmware in your repository?

It wouldn’t uniquely identify every version, but it could at least narrow things down quite a bit.

tantien11
Offline
Last seen: 6 months 3 weeks ago
Joined: 07/28/2018 - 02:14
Posts: 8

i found this led https://s.click.aliexpress.com/e/m3DSyfis it is probably a suggestion for D4Sv2

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

tantien11 wrote:
i found this led [CUT] it is probably a suggestion for D4Sv2

Could you please share a direct link to the item instead of a click tracker?
tantien11
Offline
Last seen: 6 months 3 weeks ago
Joined: 07/28/2018 - 02:14
Posts: 8
Agro
Agro's picture
Online
Last seen: 2 min 8 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6169
Location: Ślōnsk

Thank you.
Interesting LED but the description says it needs voltage between 3.5V and 5.5V. Too much for D4Sv2.

Chatika vas Paus
Online
Last seen: 13 min 29 sec ago
Joined: 09/03/2017 - 13:46
Posts: 811

Tried to compile rampingUI (the original from D4) and I have two errors:

The program has not been modified.
What to do with this?

Lexel
Lexel's picture
Offline
Last seen: 3 weeks 4 days ago
Joined: 11/01/2016 - 08:00
Posts: 5889
Location: Germany
tantien11 wrote:
https://www.aliexpress.com/item/32960831881.html SK6812-EC1515

there are different pin outs from one supplier to another for those RGB LEDs, also footprints are not always the same
so you better know exactly which one is identical to the original ones

contactcr
Offline
Last seen: 1 hour 26 min ago
Joined: 05/19/2017 - 18:52
Posts: 3105
Location: US

I must say I originally speculated the optical programming of the 371D to be a bit gimmicky but after using it a dozen or so times it’s actually pretty cool.

Being able to configure Anduril’s dozen options all at once would be very cool. You could even supply a link to newbs with an entire config they cant figure out. From a MFG side they also used it to throttle a few features back that would potentially lead to customer dissatisfaction but could still be overriden by the user by special means.

I’ve probably done it 15-20 times and as far as I could tell it accepted the settings every time. I would probably not want this to be the only way to configure it but if it was an additional way to configure and maybe a few select settings reserved as the “only” way to get to them that would be fine.

Just my .02

trailhunter
Offline
Last seen: 1 week 13 hours ago
Joined: 12/23/2015 - 17:56
Posts: 772
Location: Mars

Is it possible to copy the branch into into my own repo in GIT? Im more familiar with Git and make it publicly accessible?

SammysHP
SammysHP's picture
Online
Last seen: 13 sec ago
Joined: 06/25/2019 - 14:35
Posts: 385
Location: Germany

Yes, via fast-export. I did it some time ago, but haven’t updates for a while: https://github.com/SammysHP/flashlight-firmware

Chatika vas Paus
Online
Last seen: 13 min 29 sec ago
Joined: 09/03/2017 - 13:46
Posts: 811

As for my previous question. Commenting on a few lines of code helped, the program compiles normally, but I don’t know if it will work properly.

AS says the error is in this line:
#define delay_4ms _delay_4ms
How to remove this error?

ZozzV6
ZozzV6's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 03/24/2016 - 12:19
Posts: 2415
Location: Near to my soldering iron.

Hello!
Yesterday I got my MF01 mini and it got Anduril. I did not find a specific version of Andutil for this one. Maybe Astrolux used the MF01S Anduril?
The thermal stepdown acts like it is freightening of getting warm. Stock factory setting is around 2200 lumens at ramp max. I lowered it to around 1400. Even at 1400 lumens it ramps down fast after a few seconds of turn on to around 700 lumens and then slowly creeping up to 1300-ish and it can keep that. But default temp set to 45C. I sometimes measured 40C at head and it starting to lower output again and again but sometimes it heating up to 55-60C I tried various settings of thermal calibration and used IR thermometer to calibrate when it is settled a while cooled down but at a cold start it is always making that drop first. I can’t figure it out. Even if I set step down temp to 65C it making that drop first when it is only 36-37C

contactcr
Offline
Last seen: 1 hour 26 min ago
Joined: 05/19/2017 - 18:52
Posts: 3105
Location: US

I think it’s just the rate of temp change. I think it was made worse in a build around 2 months ago or something. This has been documented in all the newer FW3A builds too.

trailhunter
Offline
Last seen: 1 week 13 hours ago
Joined: 12/23/2015 - 17:56
Posts: 772
Location: Mars

why would anduril.c have harcoded RGB when not all anduril lights support RGB? Is it possible to move this functionality to cfg-* files where flashlights support it?

contactcr
Offline
Last seen: 1 hour 26 min ago
Joined: 05/19/2017 - 18:52
Posts: 3105
Location: US

afaik it wont even compile unless it is enabled in the config so it basically works like you say already. this is why you can comment out one line to disable muggle and get enough free space for more development.

f0xx
f0xx's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 02/27/2019 - 18:44
Posts: 435
Location: Near Dallas, Texas

On this thread HERE it seems that Hank has put a new driver in the D1.

User cuberS seems to have a D1 with an ATtiny1634 (he has flashing pads and the MCU signature matches the ATtiny1634), but I haven’t find any firmware in the repository for such a light. He flashed the ATtiny85 firmware and it does not work. Is there a firmware he can flash to rescue his light?

dropman
Offline
Last seen: 3 days 22 hours ago
Joined: 02/03/2019 - 11:04
Posts: 36

Probably asked before, but I cant find answer. I am pretty sure I even saw that TK said that this will be included as an option soon… I am trying to figure out how to disable FET mode on FW3A completely. Will writing zeroes to PWM3_LEVELS help? Or its more complicated?
Another useful option would be PWMx_LEVELS settings and steps settings for faster (someone will prefer slower also) ramping. I know its done with levels_calc.py but testing on FW3A is not so easy (soldering every time).
Last question is about battcheck mode option. I see

Quote:
//#define BATTCHECK_8bars // FIXME: breaks build and //#define BATTCHECK_4bars // FIXME: breaks build
in source but this probably dont work yet, right?
Thanks.

EDIT:
Ok, I tried this:

Quote:
#define RAMP_LENGTH 90
#define PWM1_LEVELS 1,1,2,2,3,4,5,7,8,10,12,14,17,20,23,27,31,36,40,46,51,58,64,71,79,87,96,105,115,126,137,149,161,174,188,203,218,234,251,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,10,13,17,21,25,29,33,38,42,47,52,57,63,68,74,80,86,92,99,106,113,120,127,135,143,151,159,167,176,185,194,204,213,223,234,244,255,255,255,255,255,255,255,255,255,255,255,255,255
#define PWM3_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#define MAX_1×7135 40
#define MAX_Nx7135 90
#define HALFSPEED_LEVEL 10
#define QUARTERSPEED_LEVEL 3

It seems that its working. Ramping is faster. Ramping stops after Nx7135 blip. Double click while on works. Only thing that bothers me is slight variation in brightness at the moment when starting ramping down from Nx7135. Maybe its because I had to put 255 instead of 0 at the end of PWM1_LEVELS?
Dr.Phillip
Dr.Phillip's picture
Offline
Last seen: 1 day 4 hours ago
Joined: 09/26/2019 - 04:23
Posts: 160

Hi guys, I have a question regarding flashing firmware. I am a total noob when it comes to flashing and I reached dead end when I decided to flash my Astrolux MF01 mini to correct some voltage reading problems (There is a large voltage difference between the actual battery voltage and the blinked out voltage). I managed to find some instruction and I did this:

I downloaded the branch “lp:~toykeeper/flashlight-firmware/fsm” from: https://launchpad.net/flashlight-firmware because it had the code for Astrolux/Mateminco MF01 MINI. I Unzipped the tarball and found the file I needed to adjust to correct the Voltage measurement:

File: hwdef-Mateminco_MF01-Mini
Lines:
#ifndef VOLTAGE_FUDGE_FACTOR
#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V
#endif

I changed the VOLTAGE_FUDGE_FACTOR to 10 to add another 0.25V.
Now that I have it, how do I run the make command in the fsm\ToyKeeper\spaghetti-monster\anduril folder?

Do I need a special compiler (I am using windows)? The instructions I found said: “the code can then be built by going into the anduril directory and running “make”. This compiles one .hex file for each cfg-*.h file it finds.”

Could anyone please recommend me the best and the easiest way to do this?

contactcr
Offline
Last seen: 1 hour 26 min ago
Joined: 05/19/2017 - 18:52
Posts: 3105
Location: US

The short answer is you need to download Atmel Studio and load your edited files in there then choose “compile for size” in the properties. It will create a hex file that you can flash with a SOIC clip and some shady USB drivers.

0-8-15 User
Offline
Last seen: 5 months 3 days ago
Joined: 11/25/2019 - 17:07
Posts: 50

I recently got my hands on a used Sofirn SP36 Anduril and found that the temperature limit is exceeded by more than 10 K, although the measured temperature is relatively accurate. This made me curious, especially since I recently ordered some Emisar D4V2s. So I wrote a little simulation to test the thermal regulation code.

Thermography:

https://abload.de/img/heatup_sp36_16x_60fpsgbkwn.gif

Measurement result:

https://abload.de/img/anduril_run-2tak3r.png

Simulation result (revision 388):

https://abload.de/img/anduril_temp_regulatin1jcj.png

Simulation result (revision 454):

https://abload.de/img/anduril_temp_regulatirtjec.png

Simulation result (mockup of how it could look like):

https://abload.de/img/anduril_temp_regulatikzk6h.png

What I found so far:

PS: On an aside, the project name (sphagetti-monster) hits the nail on the head. Big Smile

CNCman
CNCman's picture
Offline
Last seen: 2 days 5 hours ago
Joined: 04/07/2018 - 10:10
Posts: 591
Location: Mississippi Gulf Coast

I just purchased a Haikelite MT09 and ordered a new driver from Lexel.

He wants to know what firmware i want.

I have no clue, any suggestions ????

CNC & Manual Machinist. Think outside the box too long , cannot find your way back in.

Never give up, Never surrender. Make someone Smile today.

f0xx
f0xx's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 02/27/2019 - 18:44
Posts: 435
Location: Near Dallas, Texas

Anduril

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

Anduril

Quadrupel
Quadrupel's picture
Online
Last seen: 1 min 11 sec ago
Joined: 12/03/2017 - 10:40
Posts: 252
Location: Lithuania

Do we have some soft for red bicycle back light?

Chatika vas Paus
Online
Last seen: 13 min 29 sec ago
Joined: 09/03/2017 - 13:46
Posts: 811

There is such a thing, but I don’t actually know how it works.
click – tail light

Pages