root/platform/a570/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 2250;
   6 }
   7 
   8 long get_vbatt_max()
   9 {
  10     return 2550;
  11 }
  12 
  13 // aperture 2.6 2.8 3.2 3.5 4.0 4.5 5.0 5.5 
  14 static const int fl_tbl[] = {5800, 6600, 7900, 9900, 12700, 16000, 19600, 23200};
  15 #define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0]))
  16 #define CF_EFL 60345
  17 
  18 const int zoom_points = NUM_FL;
  19 
  20 int get_effective_focal_length(int zp) {
  21     return (CF_EFL*get_focal_length(zp))/10000;
  22 }
  23 
  24 int get_focal_length(int zp) {
  25     if (zp<0) return fl_tbl[0];
  26     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1];
  27     else return fl_tbl[zp];
  28 }
  29 
  30 int get_zoom_x(int zp) {
  31     if (zp<1) return 10;
  32     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1]*10/fl_tbl[0];
  33     else return fl_tbl[zp]*10/fl_tbl[0];
  34 }
  35 
  36 #if 0
  37 int rec_switch_state(void) {
  38 //    mode  = (physw_status[1] & 0x02000000)?MODE_REC:MODE_PLAY;
  39         return (physw_status[1] & 0x02000000);
  40 }
  41 #endif

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