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
3 #include "../generic/main.c"
4
5 long get_vbatt_min()
6 {
7 return 2100;
8 }
9
10 long get_vbatt_max()
11 {
12 return 2800;
13 }
14
15 static const int fl_tbl[] =
16 { 5800, 6600, 7900, 9900, 12700, 16000, 19600, 23200 };
17 #define NUM_FL (int)(sizeof(fl_tbl)/sizeof(fl_tbl[0]))
18 #define CF_EFL 60345
19
20 const int zoom_points= NUM_FL;
21
22 int get_effective_focal_length(int zp)
23 {
24 return (CF_EFL*get_focal_length(zp))/10000;
25 }
26
27 int get_focal_length(int zp)
28 {
29 if (zp<0)
30 return fl_tbl[0];
31 else if (zp>NUM_FL-1)
32 return fl_tbl[NUM_FL-1];
33 else
34 return fl_tbl[zp];
35 }
36
37 int get_zoom_x(int zp)
38 {
39 if (zp<1)
40 return 10;
41 else if (zp>NUM_FL-1)
42 return fl_tbl[NUM_FL-1]*10/fl_tbl[0];
43 else
44 return fl_tbl[zp]*10/fl_tbl[0];
45 }
46
47 #if 0
48 int rec_switch_state(void) {
49
50 return (physw_status[1] & 0x00000040);
51 }
52 #endif