root/platform/ixus950_sd850/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 {
   5     return 3500;
   6 }
   7 
   8 long get_vbatt_max()
   9 {
  10     return 4100;
  11 }
  12 
  13 //ixus800_sd700
  14 //static const int fl_tbl[] = {5800, 6600, 7500, 8600, 10000, 11800, 14300, 18600, 23200};
  15 //ixus950_sd850 (from EXIF), basically the same as in ixus800_sd700 (4x zoom lens)
  16   static const int fl_tbl[] = {5800, 6630, 7470, 8640, 9970,  11820, 14330, 18630, 23200};
  17 #define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0]))
  18 #define CF_EFL 60345 // 60345 for 1/2.5" sensor, 47946 for 1/1.8" sensor
  19 
  20 const int zoom_points = NUM_FL;
  21 
  22 int get_effective_focal_length(int zp) {
  23     return (CF_EFL*get_focal_length(zp))/10000;
  24 }
  25 
  26 int get_focal_length(int zp) {
  27     if (zp<0) return fl_tbl[0];
  28     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1];
  29     else return fl_tbl[zp];
  30 }
  31 
  32 int get_zoom_x(int zp) {
  33     if (zp<1) return 10;
  34     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1]*10/fl_tbl[0];
  35     else return fl_tbl[zp]*10/fl_tbl[0];
  36 }
  37 
  38 #if 0
  39 int rec_switch_state(void) {
  40 //    mode  = (physw_status[2] & 0x1000)?MODE_REC:MODE_PLAY;    
  41         return (physw_status[2] & 0x1000);    
  42 }
  43 #endif

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