Commit 1815da86 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

api_test.lua: relaxed half-shutter checks (replaced some assertions with warnings)

5D2: there may be spurious half-shutter events, e.g. if scene brightness is changed during the test
50D: https://www.magiclantern.fm/forum/index.php?topic=14828.msg197548#msg197548

--HG--
branch : lua_fix
parent 13c6f6338f5d
......@@ -600,14 +600,18 @@ function test_keys()
assert(camera.gui.idle == false)
key.press(KEY.HALFSHUTTER)
sleep(0.2)
assert(key.last == KEY.HALFSHUTTER)
if key.last ~= KEY.HALFSHUTTER then
printf("warning: last key not half-shutter, but %d\n", key.last)
end
sleep(1)
-- half-shutter should close Canon menu
assert(camera.gui.menu == false)
assert(camera.gui.idle == true)
key.press(KEY.UNPRESS_HALFSHUTTER)
sleep(0.2)
assert(key.last == KEY.UNPRESS_HALFSHUTTER)
if key.last ~= KEY.UNPRESS_HALFSHUTTER then
printf("warning: last key not unpress half-shutter, but %d\n", key.last)
end
end
printf("Half-shutter test OK.\n")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment