exposurses

Check-in [506ba48833]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:I am King of Fail

I mean, just how? I think I need a few years more sleep or something

Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 506ba488339a7a99d5d702a25ad21892be4d16ceead08ad2de7083bc2046eedd
User & Date: base@atomicules.co.uk 2013-09-02 09:47:34.000
Context
2013-09-02
10:20
Implement exposure equations and matching for Aperture menu

Also: More evidence I am in a continual half-daze

- Need to define shutter value as double in `aperture` as otherwise both
arguments will be integers and I'm guessing it'd not going to work out
well. Plus... need to use `fraction_to_double` anyway to feed the
value in.
- Had done the "substring" thing wrong in `strncpy` and was one decimal
place off in getting the paerture value. I.e. would have got "1."
instead of "1.4" from "f/1.4"
- Like the fool I am, in the loop and the copy and paste I'd done, I'd
not changed from `aperture_array[0]` to `aperture_array[n]` check-in: 845d8653eb user: base@atomicules.co.uk tags: origin/master, trunk

09:47
I am King of Fail

I mean, just how? I think I need a few years more sleep or something check-in: 506ba48833 user: base@atomicules.co.uk tags: origin/master, trunk

09:29
Actually make it work this time.

See this commit: 8d3e66b5ecffa8bcf7691c3f0600840b934beb1a

I'm such an idiot.

- Remove `set_top_row` when setting the shutter menu to the correct
value. Leaving this in fooled me into thinking I had things working
because I just happened to test on the matching ISO/Aperture values.
Plonker. And then it turns out, there was loads wrong.
- Need to include stdlib.h for `strtod` function, otherwise it uses some
kind of stub function (no complaints in compile or use, but it just
doesn't work).
- Wasn't passing right kind of values to `shutter` anyway! Need to
convert these to numeric
- Need to use `fabs` not `abs` for doubles.
- In `nearest_match` wasn't using the correct arrays, had copied over
`iso_array` and forgotten to change them
- Use `strstr` instead `strchr` as couldn't get the former to work and
was probably the wrong one to be using
- Leave some commented out stuff at the bottom that I've been using for
debugging
- check-in: 68919dca22 user: base@atomicules.co.uk tags: origin/master, trunk

Changes
Unified Diff Side-by-Side Diff Patch
Changes to exposurses.c.