root/platform/ixus900_sd900/main.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. get_vbatt_min
  2. get_vbatt_max
  3. get_effective_focal_length
  4. get_focal_length
  5. get_zoom_x
  6. 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};   // EXIF value for each zoom step 
  12 #define NUM_FL (int)(sizeof(fl_tbl)/sizeof(fl_tbl[0]))
  13 #define CF_EFL 48052   // 37/7.7 * 10000
  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     //mode  = (physw_status[2] & 0x4000)?MODE_REC:MODE_PLAY;
  36     return (physw_status[2] & 0x4000);
  37 }
  38 #endif

/* [<][>][^][v][top][bottom][index][help] */