source: trunk/include/conf.h @ 986

Revision 986, 8.5 KB checked in by reyalp, 2 years ago (diff)

add "always" option to "disable lcd off", prevents lcd off when not in alt mode. From atalwar in http://chdk.setepontos.com/index.php?topic=5854.0 with modifications.

  • Property svn:eol-style set to native
Line 
1#ifndef CONF_H
2#define CONF_H
3
4#include "gui.h"
5#include "script.h"
6
7#define USER_MENU_ITEMS 14
8
9typedef struct {
10    unsigned short  x, y;
11} OSD_pos;
12
13typedef struct {
14    int save_raw;
15    int save_raw_in_video;
16    int save_raw_in_sports;
17    int save_raw_in_burst;
18    int save_raw_in_edgeoverlay;
19    int save_raw_in_auto;
20    int save_raw_in_ev_bracketing;
21    int save_raw_in_timer;
22    int raw_exceptions_warn;
23    int raw_in_dir;
24    int raw_prefix;
25    int raw_ext;
26    int raw_save_first_only; //for series shooting
27    int raw_nr;
28    int sub_batch_prefix; // output of batch subtracts
29    int sub_batch_ext;
30    int sub_in_dark_value; // values <= to this are not subtracted, i.e. the dark value of your darkframe
31    int sub_out_dark_value; // minimum value to output from subtract, i.e. dark value of your final image
32    int raw_cache;
33    int dng_raw;
34    int raw_timer;
35    int raw_dng_ext;
36    int dng_usb_ext;
37
38    int show_osd;
39    int hide_osd;
40    int show_osd_in_review;
41    int script_shoot_delay;
42    int show_histo;
43    int ubasic_vars[SCRIPT_NUM_PARAMS];
44    char script_file[100];
45
46    int show_dof;
47    int batt_volts_max;
48    int batt_volts_min;
49    int batt_step_25;
50    int batt_perc_show;
51    int batt_volts_show;
52    int batt_icon_show;
53    int space_bar_show;
54    int space_bar_size;
55    int space_bar_width;
56    int space_icon_show;
57    int show_clock;
58    int show_temp;
59    int temperature_unit;
60    int clock_format;
61    int clock_indicator;
62    int clock_halfpress;
63    int space_perc_show;
64    int space_mb_show;
65    int space_perc_warn;
66    int space_mb_warn;
67    int space_warn_type;
68    int show_movie_time;
69    int show_movie_refresh;
70
71
72    int zoom_value;
73
74    int show_state;
75    int show_remaining_raw;
76    int remaining_raw_treshold;
77    int show_raw_state;
78    int show_values;
79    int show_values_in_video;
80    int show_overexp;
81
82    int histo_mode;
83    int histo_auto_ajust;
84    int histo_ignore_boundary;
85    int histo_layout;
86    int histo_show_ev_grid;
87
88    int zebra_draw;
89    int zebra_mode;
90    int zebra_restore_screen;
91    int zebra_restore_osd;
92    int zebra_over;
93    int zebra_under;
94    int zebra_draw_osd;
95    int zebra_multichannel;
96
97    OSD_pos histo_pos;
98    OSD_pos dof_pos;
99    OSD_pos batt_icon_pos;
100    OSD_pos space_icon_pos;
101    OSD_pos space_hor_pos;
102    OSD_pos space_ver_pos;
103    OSD_pos batt_txt_pos;
104    OSD_pos space_txt_pos;
105    OSD_pos mode_state_pos;
106    OSD_pos mode_raw_pos;
107    OSD_pos values_pos;
108    OSD_pos clock_pos;
109    OSD_pos mode_video_pos;
110    OSD_pos mode_ev_pos;
111    OSD_pos temp_pos;
112    OSD_pos ev_video_pos;
113
114    color histo_color;
115    color histo_color2; // markers/border
116    color osd_color;
117    color osd_color_warn;
118    color batt_icon_color;
119    color space_color;
120    color menu_color;
121    color menu_title_color;
122    color menu_cursor_color;
123    color menu_symbol_color;
124    int menu_center;
125    int menu_select_first_entry;
126    int menu_symbol_enable;
127    color reader_color;
128    color zebra_color; // under/over
129    color grid_color;
130    color osd_color_override;
131
132    int font_cp;
133    char menu_rbf_file[100];
134    char menu_symbol_rbf_file[100];
135
136    char lang_file[100];
137
138    char reader_file[100];
139    int  reader_pos;
140    int  reader_autoscroll;
141    int  reader_autoscroll_delay;
142    char reader_rbf_file[100];
143    int  reader_codepage;
144    int  reader_wrap_by_words;
145
146    int sokoban_level;
147
148    int flashlight;
149    int fast_ev;
150    int fast_ev_step;
151    int fast_image_quality;
152    int fast_movie_control;
153    int fast_movie_quality_control;
154    int splash_show;
155    int start_sound;
156    int platformid;
157
158    int use_zoom_mf;
159    long alt_mode_button; //for S-series
160    int alt_prevent_shutdown;
161
162    int show_grid_lines;
163    char grid_lines_file[100];
164    int grid_force_color;
165
166    int video_mode;
167    int video_quality;
168    int video_bitrate;
169     
170    int tv_bracket_value;
171    int av_bracket_value;
172    int iso_bracket_value;
173    int iso_bracket_koef;
174    int subj_dist_bracket_value;
175    int subj_dist_bracket_koef;
176    int bracket_type;
177    int bracketing_add_raw_suffix;
178    int clear_bracket;
179    int clear_video;
180    int override_disable;
181    int override_disable_all;
182
183
184    int tv_override_value;
185    int tv_override_koef;
186    int tv_enum_type;
187    int av_override_value;
188   
189    int nd_filter_state;
190   
191    int iso_override_value;
192    int iso_override_koef;
193    int zoom_override_value;
194    int zoom_override;
195    int subj_dist_override_value;
196    int subj_dist_override_koef;
197    int clear_override;
198    int clear_zoom_override;
199   
200    int autoiso_enable;
201    int autoiso_shutter;
202    int autoiso_user_factor;
203    int autoiso_is_factor;
204    int autoiso_max_iso_hi;
205    int autoiso_max_iso_auto;
206    int autoiso_min_iso;
207
208    int recalc_exposure;
209    int tv_exposure_order;
210    int av_exposure_order;
211    int iso_exposure_order;
212
213    int dof_subj_dist_as_near_limit;
214    int dof_use_exif_subj_dist;
215    int dof_subj_dist_in_misc;
216    int dof_near_limit_in_misc;
217    int dof_far_limit_in_misc;
218    int dof_hyperfocal_in_misc;
219    int dof_depth_in_misc;
220    int dof_dist_from_lens;
221   
222   
223    int values_show_in_review;
224    int values_show_zoom;
225    int values_show_real_aperture;             
226    int values_show_real_iso;
227    int values_show_market_iso;
228    int values_show_iso_only_in_autoiso_mode;
229    int values_show_ev_seted;
230    int values_show_ev_measured;
231    int values_show_bv_measured;
232    int values_show_bv_seted;
233    int values_show_overexposure;
234    int values_show_canon_overexposure;
235    int values_show_luminance;
236
237    int debug_shortcut_action;  // 0=none, 1=dump, 2=page display
238    int debug_display;          // 0=none, 1=props, 2=flash param, 3=tasks
239    int debug_propcase_page;     // save propcase page
240        int debug_lua_restart_on_error; // 0=no, 1=yes
241        int debug_misc_vals_show; // 0=no, 1=yes
242
243    int script_startup;                 // remote autostart
244    int remote_enable;                  // remote enable
245    int user_menu_enable;
246    int user_menu_vars[USER_MENU_ITEMS];
247    int user_menu_as_root;
248    int zoom_scale;
249    int unlock_optical_zoom_for_video;
250    int mute_on_zoom;
251    int bad_pixel_removal;
252    int video_af_key;
253
254    char curve_file[100];
255    int curve_enable;
256
257    int edge_overlay_enable;
258    int edge_overlay_filter;
259    int edge_overlay_thresh;
260    int edge_overlay_zoom; // shall zoom be set when *edg file is loaded?
261    int edge_overlay_pano; // whether a full press changes back to live mode
262    int edge_overlay_pano_overlap; // overlap in % in pano mode
263    int edge_overlay_show; // whether to show overlay even when no button is pressed
264    int edge_overlay_play; // whether edge overlay is switched on also for play mode
265    color edge_overlay_color;
266
267    int synch_enable;
268    int ricoh_ca1_mode;
269    int synch_delay_enable;
270    int synch_delay_value;
271    int synch_delay_coarse_value;
272    int remote_zoom_enable;
273    int zoom_timeout;
274
275    int script_param_set;
276    int script_param_save;
277   
278    long mem_view_addr_init;
279    int flash_sync_curtain;
280    int flash_video_override;
281    int flash_manual_override;
282    int flash_video_override_power;
283} Conf;
284
285extern Conf conf;
286
287#define ALT_PREVENT_SHUTDOWN_NO         0
288#define ALT_PREVENT_SHUTDOWN_ALT        1
289#define ALT_PREVENT_SHUTDOWN_ALT_SCRIPT 2
290#define ALT_PREVENT_SHUTDOWN_ALWAYS     3
291
292#define SHOOTING_PROGRESS_NONE          0
293#define SHOOTING_PROGRESS_STARTED       1
294#define SHOOTING_PROGRESS_PROCESSING    2
295#define SHOOTING_PROGRESS_DONE          3
296
297// video quality defaults. Ideally, these should match the camera default settings
298#define VIDEO_DEFAULT_QUALITY   84  // ? where does 84 come from
299#define VIDEO_MAX_QUALITY       99
300#define VIDEO_DEFAULT_BITRATE   3 // should be 1 for all cams
301
302extern int state_kbd_script_run;
303extern int state_shooting_progress;
304extern int state_save_raw_nth_only;
305extern int state_expos_recalculated;
306extern int state_expos_under;
307extern int state_expos_over;
308
309extern void script_autostart();                         // remote autostart
310extern void conf_save();
311extern void conf_restore();
312extern void conf_load_defaults();
313extern int shutter_int;
314extern void conf_change_dng(void);
315extern void conf_update_prevent_shutdown(void);
316
317// reyalp: putting these in conf, since the conf values are lookups for them
318// prefixes and extentions available for raw images (index with conf.raw_prefix etc)
319#define NUM_IMG_PREFIXES 3 // IMG_ CRW_ SND_ (could add ETC_ SDR_ AUT_ MVI_ MRK_)
320#define NUM_IMG_EXTS 5 // .JPG .CRW .CR2 .THM .WAV (could add .AVI .MRK)
321extern const char* img_prefixes[NUM_IMG_PREFIXES];
322extern const char* img_exts[NUM_IMG_EXTS];
323// ugh, but various things need it
324#define VIDEO_BITRATE_STEPS 10
325extern const char *video_bitrate_strings[VIDEO_BITRATE_STEPS];
326#endif
Note: See TracBrowser for help on using the repository browser.