I tried to fix extended bracketing. Shutter works fine but iso freezes when editing anything other than first iso.
static MENU_UPDATE_FUNC (hdrv_extended_shutter_display)
{
uint8_t *shutter_index = (uint8_t *) hdrv_extended_shutter;
uint8_t pos = hdrv_extended_step_edit - 1;
if(CURRENT_VALUE)
{
MENU_SET_VALUE(
"Shutter #%d : 1/%d",
pos + 1,
hdrv_shutter_table[shutter_index[pos]]
);
}
else
{
MENU_SET_VALUE(
"Shutter #%d : ---",
pos + 1
);
}
if(hdrv_extended_step_edit > hdrv_extended_steps)
{
MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "This entry is unused. Increase step count.");
}
}
static MENU_SELECT_FUNC (hdrv_extended_shutter_toggle)
{
uint8_t *shutter_index = (uint8_t *)priv;
uint8_t pos = hdrv_extended_step_edit - 1;
int new_pos = 0;
new_pos = COERCE(shutter_index[pos] + delta, 0, COUNT(hdrv_shutter_table) - 1);
shutter_index[pos] = new_pos;
}
static MENU_SELECT_FUNC (hdrv_extended_iso_toggle)
{
uint8_t *iso_table = (uint8_t *)priv;
uint8_t pos = hdrv_extended_step_edit - 1;
int new_pos = 0;
do
{
new_pos = mod(iso_table[pos] - 72 + delta, MAX_ISO_BV - 72 + 1) + 72;
iso_table[pos] = new_pos;
}
while (!is_hdr_valid_iso(raw2iso(iso_table[pos])));
}
static MENU_UPDATE_FUNC (hdrv_extended_iso_display)
{
//~ uint8_t *iso_table = (uint8_t *)priv;
uint8_t *iso_table = (uint8_t *) hdrv_extended_iso;
// uint8_t *iso_table = (uint8_t *) CURRENT_VALUE;
uint8_t pos = hdrv_extended_step_edit - 1;
int effective_iso = get_effective_hdr_iso_for_display(iso_table[pos]);
int d = effective_iso - iso_table[pos];
d = d * 10 / 8;
if(iso_table[pos])
{
if (d)
{
MENU_SET_VALUE(
"ISO #%d: %d (%d, %s%d.%d EV)",
pos + 1,
raw2iso(effective_iso),
raw2iso(iso_table[pos]),
d > 0 ? "+" : "-", ABS(d)/10, ABS(d)%10
);
}
else
{
MENU_SET_VALUE(
"ISO #%d : %d",
pos + 1,
raw2iso(effective_iso)
);
}
}
else
{
MENU_SET_VALUE(
"OFF #%d : ---",
pos + 1
);
}
if(hdrv_extended_step_edit > hdrv_extended_steps)
{
MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "This entry is unused. Increase step count.");
}
}
#endif