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