Author Topic: Replace numerical values shutter/aperture/iso values with #define  (Read 1848 times)

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Replace numerical values shutter/aperture/iso values with #define
« on: September 27, 2013, 10:06:14 AM »
I think the values for shutter/apertrue/iso around the code, even if sometimes ammended with a comment, are hard to read and prone to error. I suggest replacing them with #define - there are not *that* much values after all, and if they are buried in some .h file they won't get in the way while the code will get easier to read... comments on this idea?

Edit: Also, instead of adding a numerical 8 it should be RAW_FULL_STOP or something like this... this would change this line from auto_iso

Code: [Select]
int ref_tv = 88 + 8*(aiso_av_shutter-1);

into this:

Code: [Select]
int ref_tv = RAW_SHUTTER_30S + RAW_FULL_STOP*(aiso_av_shutter-1);