Yes, it worked. Now I got normally operating flashlights from FF on Anduril 2 rev.657.
Thus, in order to update any Lume1-Fireflies Driver For Hardware Revision B (orange one)
for Anduril 2 rev. 657 of you need to make the following changes:
cfg-fireflies-lume1.h
#define MAX_1x7135 149 // was #define MAX_1x7135 69 - this is misuse of option because here we got also MIN_THERM_STEPDOWN
...
// #define USE_TENCLICK_THERMAL_CONFIG - obsolete
...
// #define USE_VOLTAGE_LOWPASS - obsolete
ramp-mode.c - line 310 and below
#ifdef USE_THERMAL_REGULATION
...
#ifdef USE_SET_LEVEL_GRADUALLY
//set_level_gradually(stepdown); - comment out
>>> if (actual_level == 150) {set_level(149);} // added
>>> else {set_level_gradually(stepdown);} // added
#else
set_level(stepdown);
#endif
fsm-adc.c
#ifdef USE_THERMAL_REGULATION
…
#define TURBO_TEMP_EXTRA 7
…
// old code block
#ifndef USE_EXTERNAL_TEMP_SENSOR
// onboard sensor for attiny25/45/85/1634
temperature = (measurement>>1) + THERM_CAL_OFFSET + (int16_t)therm_cal_offset - 275;
#else
// external sensor
temperature = EXTERN_TEMP_FORMULA(measurement>>1) + THERM_CAL_OFFSET + (int16_t)therm_cal_offset;
#endif
// how much has the temperature changed between now and a few seconds ago?
int16_t diff;
diff = measurement - temperature_history[history_step];
// update / rotate the temperature history
temperature_history[history_step] = measurement;
history_step = (history_step + 1) & (NUM_TEMP_HISTORY_STEPS-1);
// PI[D]: guess what the temperature will be in a few seconds
uint16_t pt; // predicted temperature
pt = measurement + (diff * THERM_LOOKAHEAD);
// convert temperature limit from C to raw 16-bit ADC units
// C = (ADC>>6) - 275 + THERM_CAL_OFFSET + therm_cal_offset;
// ... so ...
// (C + 275 - THERM_CAL_OFFSET - therm_cal_offset) << 6 = ADC;
uint16_t ceil = (therm_ceil + 275 - therm_cal_offset - THERM_CAL_OFFSET) << 1;
int16_t offset = pt - ceil;
// replace with this
#ifndef USE_EXTERNAL_TEMP_SENSOR
// onboard sensor for attiny25/45/85/1634
temperature = (measurement>>1) + THERM_CAL_OFFSET + (int16_t)therm_cal_offset - 275;
#else
// external sensor
temperature = EXTERN_TEMP_FORMULA(measurement>>1) + THERM_CAL_OFFSET + (int16_t)therm_cal_offset;
#endif
// how much has the temperature changed between now and a few seconds ago?
int16_t diff;
diff = measurement - temperature_history[history_step];
// update / rotate the temperature history
temperature_history[history_step] = measurement;
history_step = (history_step + 1) & (NUM_TEMP_HISTORY_STEPS-1);
// PI[D]: guess what the temperature will be in a few seconds
uint16_t pt; // predicted temperature
pt = measurement + (diff * THERM_LOOKAHEAD);
// convert temperature limit from C to raw 16-bit ADC units
#ifndef USE_EXTERNAL_TEMP_SENSOR
// C = (ADC>>6) - 275 + THERM_CAL_OFFSET + therm_cal_offset;
// ... so ...
// (C + 275 - THERM_CAL_OFFSET - therm_cal_offset) << 6 = ADC;
// Note, defined in fsm-adc.h: uint8_t therm_ceil = DEFAULT_THERM_CEIL; in Celsius
uint16_t ceil = (therm_ceil + 275 - therm_cal_offset - THERM_CAL_OFFSET) << 1;
#else
// external sensor, need to use a reverse formula otherwise the ceiling temperature will be calculated incorrectly
// convert (therm_ceil in Celsius - therm_cal_offset - THERM_CAL_OFFSET) to ADC value
uint16_t ceil = ((uint16_t)EXTERN_TEMP_REVERSE_FORMULA(therm_ceil- therm_cal_offset - THERM_CAL_OFFSET) ) << 1;
#endif
If someone has enough skills to redefine those pieces of code at the build target level, you are very welcome - my skill is not enough for this task.