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