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 return 3500;
5 }
6
7 long get_vbatt_max() {
8 return 4100;
9 }
10
11 static const int fl_tbl[] = {7700, 9000, 10500, 12500, 15600, 18800, 23100};
12 #define NUM_FL (int)(sizeof(fl_tbl)/sizeof(fl_tbl[0]))
13 #define CF_EFL 48052
14
15 const int zoom_points = NUM_FL;
16
17 int get_effective_focal_length(int zp) {
18 return (CF_EFL*get_focal_length(zp))/10000;
19 }
20
21 int get_focal_length(int zp) {
22 if(zp<0) return fl_tbl[0];
23 else if(zp>NUM_FL-1) return fl_tbl[NUM_FL-1];
24 else return fl_tbl[zp];
25 }
26
27 int get_zoom_x(int zp) {
28 if(zp<1) return 10;
29 else if(zp>NUM_FL-1) return fl_tbl[NUM_FL-1]*10/fl_tbl[0];
30 else return fl_tbl[zp]*10/fl_tbl[0];
31 }
32
33 #if 0
34 int rec_switch_state(void) {
35
36 return (physw_status[2] & 0x4000);
37 }
38 #endif