No, that part just converts values of 1-150 to 0-149.
You probably want to look in NarsilM.c for something like “outLevel = ++rampingLevel;” or “outLevel = —rampingLevel;”, and make it move by 2 each time instead of 1. That should double the ramp speed.
Or you could just give it a shorter ramp in RampingTables.h. That’s generally the preferred way to adjust ramp speed.
in the end I had to set in the firmware an offset of +30
it seems the firmware does not like negative temperature values,
at least to blink out the value, if its also affecting the internal reading this gets a problem
this would mean on very cold lights that go into thermal stepdown while they are like –10°C
I had a similar issue myself that took while to figure out. Indoors I couldn’t get the bug, but outside it stepped down (it was below 0°C outside, and not very warm inside the hut). At first I didn’t know why it stepped down so I programmed a separate step-down blink for voltage and temperature, and also if level is critical or not. It turned out that my issue was that when the readout goes below 0, the unsigned integer roles around to 255, causing the software to think the light is burning up at 255°C. Maybe similar issue you are having?
So I just removed role around to 255 on my 85 based drivers. I was low on space so I didn’t implement negative readouts. Now that I have double the space I’m considering implementing negative readouts, because sometimes I use my bike light to see approximately how cold it is when cycling in the winter. As it is now I can see when it’s below 0°C, but not how much below.
If I recall correctly, I did fix this in RampingIOS… but I completely removed and replaced all the thermal code there. The patch wouldn’t really apply to NarsilM, since the two projects have both diverged significantly from their shared ancestor. The RampingIOS patch could still be a general guide for implementing something similar in NarsilM though.
I can’t really apply the code from FSM / Anduril either since it has no common ancestor at all, and virtually no code which overlaps with Narsil.
At a quick glance, NarsilM seems to be using a uint8_t for its temperature value, so it can’t represent anything colder than freezing. It also appears to use a uint16_t for the initial raw value, from which it subtracts 275, which could set the value to 65,5XX during cold weather.
To fix only the negative temperature issues, it might work to simply use signed 16-bit values for all of this, and maybe add some checks to make sure it’s above 0. But I’m just guessing.
Hi Tom,
some suggestions for the next version of NarsilM.
I would suggest to double the time to enter settings. From 8 seconds to 16 seconds or 20.
(Edit: The 20s would interfere with the jammed button protection)
And change the clicks for RAMPING and MODES in the settings.
I think he has a point making NarsilM more robust against wrong operation.
If I handle someone the light I tell “don’t press for longer than 8 seconds”.
I think extending the time can help. The only backside would be if some switches often between MODES and RAMPING. But I guess most stay in one UI.
I guess you used 8sec to be able to switch quickly between RAMPING and MODES.
The sequence to change is:
Hold the button till it blinks the first settings, then one or two clicks and then hold the button till the lamp confirm with four blinks.
In retrospect I think it would also better to change the first setting to
1 click = RAMPING
2 clicks = MODES
Today it’s reversed.
Only for the reason RAMPING is mostly used and people try to switch off the lamp if it starts blinking.
changing the 8 to 20 seconds is just one line in the Narsil.c file
CONFIG hold - if it is not locked out or lock-out was just exited on this hold
//———————————————————————————————————————————-
if ((byLockOutSet 0) && !momentaryState)
{
if ((!ramping && (wPressDuration CONFIG_ENTER_DUR) && (fastClicks != 2) && (modeIdx != BATT_CHECK_MODE))
||
(ramping && (wPressDuration == 500))) // 8 secs in ramping mode
same for Modes to extend 2.5 to more in the setup file #define CONFIG_ENTER_DUR 160 // Config mode entry hold time - 160=2.5s, 128=2s
I changed the register and PB port in the register settings but it does not work
It seems I have to change something in the channels.h file as well, but that code does not really make sense to me so I cant change it
I’m almost certain the answer is no. When you set the step down in ramping it automatically carries over to the mode sets and vice versa. So I don’t think there’s any way you can separate them. Besides, I’m not sure why you would want different step-downs between ramping and mode sets in the first place.
The reason I ask is, I found an older entry on the german forum where it should work.
He said he has in one moon aktiv in the other not.
I never tested it and have also doubts, so I asked here