Refactor controls more
This commit is contained in:
35
src/state.h
35
src/state.h
@@ -2,9 +2,20 @@
|
||||
#include <libmegapixels.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct cstate {
|
||||
uint32_t control;
|
||||
int32_t value;
|
||||
int32_t value_req;
|
||||
int32_t max;
|
||||
bool manual;
|
||||
bool manual_req;
|
||||
uint32_t auto_control;
|
||||
} controlstate;
|
||||
|
||||
typedef struct state_main {
|
||||
libmegapixels_devconfig *configuration;
|
||||
libmegapixels_camera *camera;
|
||||
libmegapixels_aaa_stats stats;
|
||||
|
||||
// Size of the preview widget
|
||||
int preview_width;
|
||||
@@ -19,38 +30,22 @@ typedef struct state_main {
|
||||
int burst_length;
|
||||
|
||||
// Control state
|
||||
bool control_gain;
|
||||
bool control_exposure;
|
||||
bool control_flash;
|
||||
bool control_focus;
|
||||
|
||||
bool gain_is_manual;
|
||||
int gain;
|
||||
int gain_max;
|
||||
|
||||
bool exposure_is_manual;
|
||||
int exposure;
|
||||
|
||||
bool flash_enabled;
|
||||
controlstate gain;
|
||||
controlstate exposure;
|
||||
controlstate focus;
|
||||
|
||||
bool has_auto_focus_continuous;
|
||||
bool has_auto_focus_start;
|
||||
} mp_state_main;
|
||||
|
||||
typedef struct cstate {
|
||||
uint32_t control;
|
||||
int32_t value;
|
||||
int32_t value_req;
|
||||
int32_t max;
|
||||
bool manual;
|
||||
bool manual_req;
|
||||
} controlstate;
|
||||
|
||||
typedef struct state_io {
|
||||
libmegapixels_devconfig *configuration;
|
||||
libmegapixels_camera *camera;
|
||||
libmegapixels_mode *mode_capture;
|
||||
libmegapixels_mode *mode_preview;
|
||||
libmegapixels_aaa_stats stats;
|
||||
|
||||
int burst_length;
|
||||
int captures_remaining;
|
||||
|
Reference in New Issue
Block a user