I need for a special project the possibility to use decimal number values in intervalometer (maybe also bulb) (like 0.8 and 1.6 sec for example)
I'm trying to figuring out how to add it...
I've added the custom values to "timer_values" and changed it to float
I've also changed some other variables to float to host the decimal numbers
The compiling is OK but in the intervalometer menu the values appear in menu in this manner:
0.8s appear as another "0" value,
1.6 appear as another "1" value
3.2 appear as another "3" value
The calculated timelapse values are incorrect, and seems also the shooting times
What I'm doing wrong or I forgotten?
It's also seems that with silent pictures and values just below one second the camera start to shoot normally ignoring silent pic option.
Is this 1 second value hardcoded somewhere?
CHANGES MADE:
+static float timer_values[] = {0, 0.8, 1.0, 1.5, 1.6 ............................
static MENU_UPDATE_FUNC(timelapse_calc_display)
{
- int d = timer_values[interval_timer_index];
+ float d = timer_values[interval_timer_index];
d = MAX(d, get_exposure_time_ms()/1000);
int total_shots = interval_stop_after ? (int)MIN((int)interval_stop_after, (int)avail_shot) : (int)avail_shot;
int total_time_s = d * total_shots;
static MENU_UPDATE_FUNC(interval_timer_display)
{
- int d = timer_values[CURRENT_VALUE];
+ float d = timer_values[CURRENT_VALUE];
if (!d)
{
MENU_SET_NAME("Take pics...");
static MENU_UPDATE_FUNC(interval_start_after_display)
{
- int d = timer_values[CURRENT_VALUE];
+ float d = timer_values[CURRENT_VALUE];
MENU_SET_VALUE(
format_time_hours_minutes_seconds(d)
);
static MENU_UPDATE_FUNC(intervalometer_display)
{
int p = CURRENT_VALUE;
if (p)
{
float d = timer_values[interval_timer_index];
MENU_SET_VALUE("ON, %s%s",
format_time_hours_minutes_seconds(d),
BULB_EXPOSURE_CONTROL_ACTIVE ? ", BRamp" : ""
);
static MENU_UPDATE_FUNC(bulb_display)
{
- int d = BULB_SHUTTER_VALUE_S;
+ float d = BULB_SHUTTER_VALUE_S;
if (!bulb_duration_index) d = 0;
if (bulb_timer)
static MENU_UPDATE_FUNC(bulb_display_submenu)
{
- int d = BULB_SHUTTER_VALUE_S;
+ float d = BULB_SHUTTER_VALUE_S;
if (!bulb_duration_index) d = 0;
MENU_SET_VALUE(
format_time_hours_minutes_seconds(d)