Restore Question - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Restore Question

  • 3 Replies
  • 427 Views
Restore Question
« on: 30 / May / 2021, 11:13:28 »
Advertisements
I hope someone can throw some light on to the following.

I have my own restore function that I use when I exit my script at a known point.

For other occasions, eg a full shutter break from the script I have set up the following function:

Code: [Select]
function restore() -- called at script termination
    exit_alt()
end

What happens is, although the ALT is exited, the camera takes a picture, which I think it shouldn't. I would expect the restore() function to simply exit ALT mode without recognising the full shutter and taking a picture.

Or am I wrong to expect that behaviour?

*

Offline reyalp

  • ******
  • 13390
Re: Restore Question
« Reply #1 on: 30 / May / 2021, 14:24:11 »
I hope someone can throw some light on to the following.

I have my own restore function that I use when I exit my script at a known point.

For other occasions, eg a full shutter break from the script I have set up the following function:

Code: [Select]
function restore() -- called at script termination
    exit_alt()
end

What happens is, although the ALT is exited, the camera takes a picture, which I think it shouldn't. I would expect the restore() function to simply exit ALT mode without recognising the full shutter and taking a picture.

Or am I wrong to expect that behaviour?
It probably shouldn't but it's not surprising that it does. As soon as you exit all, the key state is visible to the canon firmware, so it presumably sees shoot_full still pressed.

The "obvious" solution be to sleep after exit_alt but using sleep or other functions that yield is not allowed in restore.

So the next obvious solution would be to disable the exit key implement exit yourself, waiting for the shutter to not be pressed to exit.
Don't forget what the H stands for.

Re: Restore Question
« Reply #2 on: 30 / May / 2021, 15:06:50 »
@reyalp

Quote
The "obvious" solution be to sleep after exit_alt but using sleep or other functions that yield is not allowed in restore.

Yes I had noted that guidance, hence no sleep in my function.

I have my own restore, my_restore(), that I call at various points in the script, but, of course, the restore is there for when I terminate the script with a full shutter press, ie my_restore() not called.

Not a big deal, ie I’ll just switch off ALT mode manually.
« Last Edit: 30 / May / 2021, 15:41:30 by pigeonhill »

Re: Restore Question
« Reply #3 on: 30 / May / 2021, 15:43:35 »
@reyalp

As I said in the last post, not a big deal, but it looks as if the functionality is 'broken'.

For example, if I change the exit key to some other key, then that key functions on exit, eg the menu key say.
UPDATE:
For me, with the G7X and G5X, the "right" is the best set_exit_key to use.
« Last Edit: 30 / May / 2021, 15:53:07 by pigeonhill »


 

Related Topics