Author Topic: Lua Scripting (lua.mo)  (Read 85699 times)

grnbrg

  • New to the forum
  • *
  • Posts: 9
Re: Lua Scripting (lua.mo)
« Reply #325 on: August 05, 2017, 11:59:06 PM »
:sigh:  Hopefully this is actually a bug this time, and not something that seems pretty obvious in hindsight.

Code: [Select]
-- 70D LV exposure test
-- If run in LV, high speed continuous mode, will trigger a burst of 3 frames.

menu.close()
console.show()

print("Click?")

key.wait()

camera.shutter.value = 1/500
camera.iso.value=100
camera.shoot(false)

key.wait()

This script should fire a single frame, and does in most combinations.

However, in Live View, with the drive mode set to high speed (7fps), this script fires the shutter 3 times.



Brian.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10342
  • 5D Mark Free
Re: Lua Scripting (lua.mo)
« Reply #326 on: August 06, 2017, 12:14:57 AM »
5D3 1.2.3, high speed continuous mode in LiveView: takes only one picture.

However, after trying a couple of times, I've managed to make the camera a bit unresponsive (script stuck somewhere after showing "Click?", most keys working for menu navigation, except SET and joystick press, which did not do anything). Will try to reproduce and fix this one.

Does this behavior have anything to do with key handling? (e.g. does it help if you just close the menu and use a fixed delay?)

Do other ML features that rely on picture taking (e.g. intervalometer) take multiple pictures at once in this mode?

(side note: there is a setting in ML to take a few pictures at once for e.g. motion detection, but it shouldn't apply here)

grnbrg

  • New to the forum
  • *
  • Posts: 9
Re: Lua Scripting (lua.mo)
« Reply #327 on: August 06, 2017, 01:00:08 AM »
Key handling doesn't appear to be relevant -- I came across this in the middle of another script, and pared it down to a testable example.

Just confirmed that the basic intervalometer fires 3 frame bursts where a single exposure is correct, and camera.burst(1) fires 3 frames.  Advanced bracketing seems to work fine.


Brian.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10342
  • 5D Mark Free
Re: Lua Scripting (lua.mo)
« Reply #328 on: August 06, 2017, 01:11:17 AM »
What about camera.burst(2) ?

"3 frame bursts where a single exposure is correct" -> you mean, only one of these 3 pictures has the exposure you expect, and the other two have different exposures?

Is it a regression over the regular builds? (you can try the 10/12-bit experimental build, or older builds from nikfreak)

If you can compile ML, does this also take 3 pictures?

Code: [Select]
/* don't click me, debug.c */
static void run_test()
{
    msleep(2000);
    call("Release");
}

grnbrg

  • New to the forum
  • *
  • Posts: 9
Re: Lua Scripting (lua.mo)
« Reply #329 on: August 09, 2017, 04:05:56 AM »
"3 frame bursts where a single exposure is correct" -> I expect a single shutter actuation and get three.

I have reproduced the issue with the June 24th and July 6th lua_fix builds -- Will test with the Oct 26, 2016 mainline beta tonight.

I reset the camera settings and ML settings to defaults, and while it did not fix the issue, I'm now (usually*) getting two exposures per camera.shoot(false) + LV + high speed continuous call.  Not really in a position to compile a binary.  Also, slow shutter speeds seem to work -- a 1 second shutter time didn't double or triple.  Will titrate this and report, if I can identify where the problem starts.

*.... usually?

I expanded the test script to shoot a series of -- 1/8000s, 1/4000s, 1/2000s and 1/1000s one after the other.  Usually, each call to camera.shoot(false) is producing two images, as though the function has been called twice.  But occasionally a run of the test script will produce 7 images, not 8.



Brian.

Edit:  Tested with the older mainline binary -- still getting double shutter activations.

When running the following test script:

Code: [Select]
-- 70D LV exposure test
-- If run in LV, high speed continuous mode, will trigger a burst of 3 frames.

menu.close()
console.show()

print("Click?")

key.wait()

camera.shutter.value = 1/25
camera.iso.value=100
camera.shoot(false)
camera.shutter.value = 1/10
camera.shoot(false)
camera.shutter.value = 1/5
camera.shoot(false)
camera.shutter.value = 1/4
camera.shoot(false)


key.wait()

the 1/25s call results in two images.  The subsequent three calls each reliably result in a single image.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10342
  • 5D Mark Free
Re: Lua Scripting (lua.mo)
« Reply #330 on: September 02, 2017, 11:03:48 PM »
Updates:
- menu.select now also works on submenus (api_test.lua for examples)
- bunch of fixes regarding dynamically built (sub)menus
- console now works alongside ML overlays (todo: clean up the menu)
- file_man still crashes :(

Builds will appear shortly.

tajino

  • New to the forum
  • *
  • Posts: 11
Re: Lua Scripting (lua.mo)
« Reply #331 on: September 10, 2017, 05:10:13 PM »
Would it be possible with the current ML lua API to get the current running intervalometer countdown time until the next shot is fired? I know we can get/set interval.time but how to know the time remaining until the next shot is fired.

What I'm trying to accomplish is to resume live view a few user defined seconds before the next interval.time is reached, to allow some time for auto ETTR to do its work. This only applies to shooting simple silent pic with LV power saving turn on. Currently when LV resumes for the next silent pic, there is not enough time for ETTR to work before the silent pic is taken.

Or there is a better way of doing this? Thanks.

thomasfli

  • Just arrived
  • *
  • Posts: 2
Re: Lua Scripting (lua.mo)
« Reply #332 on: October 16, 2017, 06:19:20 PM »
I do not know if this has been reported before, but I tried to use the 2017Sep11.600d102 version and the camera using that, the camera won't even turn on. As soon as the card is plugged in, the SD lamp starts blinking multiple times, pauses, and blinks in the same pattern again.

This definitely is related to this build, since when plugging in a card with a stable version of ML, everything works as it should.