Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Advanced Interval Shutter Release #67

Closed
matthudsonau opened this issue Feb 29, 2024 · 9 comments · Fixed by #73
Closed

Add Advanced Interval Shutter Release #67

matthudsonau opened this issue Feb 29, 2024 · 9 comments · Fixed by #73
Labels
enhancement New feature or request
Milestone

Comments

@matthudsonau
Copy link
Contributor

As started in #51 by @sbstjn and added in #60 , creating a more feature rich interval timer

@matthudsonau
Copy link
Contributor Author

Got a test UI up on my own fork (I think). It's...ok, at best. I'm not sure the power button is the most responsive, and I really don't like using a loop+counter for timing. This really should be done with some kind of hardware timer, but it's outside my realm of knowledge (for now)

@gkoh
Copy link
Owner

gkoh commented Mar 1, 2024

I'm not sure the power button is the most responsive

It definitely isn't.
Need to be careful as well, it has hardcoded implications for power control if held for too long.

I'm experimenting with number entry UIs right now with the thought that the workflow is:

  • configure the interval parameters (using the number entry UI)
    • count
    • delay
    • shutter open interval
    • focus interval (maybe unneeded/optional)
  • enter interval mode
    • BtnA to start/pause/restart intervalometer
    • BtnB to exit

@matthudsonau
Copy link
Contributor Author

Yeah, I found out about the hardcoded bits. No way to bypass that unfortunately (that's I've found yet, at least)

I did manage to get a timer based intervalometer working last night. Only problem is that once it's turned on you can't turn it off, and it'll crash the stick if you exit the intervalometer mode. But at least non loop based timing is something that's possible

@gkoh
Copy link
Owner

gkoh commented Mar 1, 2024

I've pushed my attempt at a spinner UI for entry of the intervalometer parameters to a branch.
Feel free to test it out.
It currently adds 2 entries right at the top level menu so you can see what it looks like.
I think it's the best I can with 2 buttons.

As of now it supports:

  • units of milliseconds, seconds and minutes
  • integers up to 999

It does not save the entered numbers (just holds them in some a global variable).

@gkoh gkoh added the enhancement New feature or request label Mar 1, 2024
@gkoh gkoh added this to the v2.0.0 milestone Mar 1, 2024
@gkoh
Copy link
Owner

gkoh commented Mar 1, 2024

Yeah, I found out about the hardcoded bits. No way to bypass that unfortunately (that's I've found yet, at least)

I did manage to get a timer based intervalometer working last night. Only problem is that once it's turned on you can't turn it off, and it'll crash the stick if you exit the intervalometer mode. But at least non loop based timing is something that's possible

The primary Arduino loop is based on a hardware timer, so using a loop+counter isn't terrible.
As the timing requirement isn't that strict and we don't need to do anything else I think it's OK.

Having said that, rather than using delay(), it's more robust to:

  • run a loop with a say, 1-10ms delay, so you can poll the buttons and not burn the MCU into the ground
  • use millis() to determine elapsed time and do things
    • I did something similar with the shutter lock msgbox counter

@matthudsonau
Copy link
Contributor Author

Branch wouldn't compile (extra parenthesis on line 40 in spinner.io). Fixed that and got the UI working

I'm not a massive fan of the UI, but I can't really see any other way to do things with only two buttons. The one thing it'll definitely need in an infinity option for the count

Maybe having some kind of preset value/s, then the fully custom spinner for each input? Just common things like 1s, 2s, 5s, 10s, 30s, 60s and custom?

@gkoh
Copy link
Owner

gkoh commented Mar 1, 2024

Branch wouldn't compile (extra parenthesis on line 40 in spinner.io). Fixed that and got the UI working

Ooops, sorry, still hacking the heck out of it.
Thanks for testing it out.

I'm not a massive fan of the UI, but I can't really see any other way to do things with only two buttons. The one thing it'll definitely need in an infinity option for the count

I hadn't even considered that ... OK difficult to spin up to infinity.

Maybe having some kind of preset value/s, then the fully custom spinner for each input? Just common things like 1s, 2s, 5s, 10s, 30s, 60s and custom?

Yes, this is also a possibility and would then handle the infinity case.
Now we have some possibilities we can likely do something that is usable.

@gkoh
Copy link
Owner

gkoh commented Mar 2, 2024

Maybe having some kind of preset value/s, then the fully custom spinner for each input? Just common things like 1s, 2s, 5s, 10s, 30s, 60s and custom?

The input spinner could have 2 modes, preset and custom, swappable with the 'BtnB + BtnA' hold trick from the shutter lock work.

I think delay and shutter times are the easiest to have preset times, if we use 'standard' shutter speeds (just looking at the dial), we get:

  • 1
  • 2
  • 4
  • 8
  • 15
  • 30
  • 60
  • 125
  • 250
  • 500

The unit spinner can always be present to scale the durations, thus shutter speeds will mostly use millisecs whilst delay would mostly use seconds or minutes.

For the count ... I'm not sure how or which presets would work well.
Perhaps it is simpler to just leave it as the spinner always and treat '000' as infinite.

I will try to get this prototyped over the next few days to see if/how it works.

@gkoh
Copy link
Owner

gkoh commented Mar 6, 2024

I'm still working on this but got distracted with other things (eg #69).

@gkoh gkoh linked a pull request Mar 7, 2024 that will close this issue
@gkoh gkoh closed this as completed in #73 Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants