This source file includes following definitions.
- get_vbatt_min
- get_vbatt_max
- get_effective_focal_length
- get_focal_length
- get_zoom_x
- rec_switch_state
1 #define HOOK_TOUCHW
2 extern void my_touchw_task(void);
3 #include "../generic/main.c"
4
5 long get_vbatt_min()
6 {
7 return 3500;
8 }
9
10 long get_vbatt_max()
11 {
12 return 4100;
13 }
14
15 static const int fl_tbl[] = {5800, 7109, 8462, 10093, 12120, 14421, 17400};
16 #define NUM_FL (int)(sizeof(fl_tbl)/sizeof(fl_tbl[0]))
17 #define CF_EFL 60345
18
19 const int zoom_points = NUM_FL;
20
21 int get_effective_focal_length(int zp) {
22 return (CF_EFL*get_focal_length(zp))/10000;
23 }
24
25 int get_focal_length(int zp) {
26 if (zp<0) return fl_tbl[0];
27 else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1];
28 else return fl_tbl[zp];
29 }
30
31 int get_zoom_x(int zp) {
32 if (zp<1) return 10;
33 else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1]*10/fl_tbl[0];
34 else return fl_tbl[zp]*10/fl_tbl[0];
35 }
36
37 #if 0
38 int rec_switch_state(void) {
39
40 return (physw_status[2] & 0x4000);
41 }
42 #endif