Commit 365fd684 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

api_test.lua: updated focus tests to include commands with wait=false

--HG--
branch : lua_fix
parent eb9cba45d089
......@@ -466,30 +466,34 @@ function test_lens_focus()
while lens.focus(-1,3,true) do end
printf("Focus distance: %s", lens.focus_distance)
msleep(500)
for i,step in pairs{3,2,1} do
printf("Focusing forward with step size %d...", step)
local steps_front = 0
while lens.focus(1,step,true) do
console.write(".")
steps_front = steps_front + 1
end
printf("")
printf("Focus distance: %s", lens.focus_distance)
msleep(500)
printf("Focusing backward with step size %d...", step)
local steps_back = 0
while lens.focus(-1,step,true) do
console.write(".")
steps_back = steps_back + 1
end
printf("")
printf("Focus distance: %s", lens.focus_distance)
for j,wait in pairs{true,false} do
printf("Focusing forward with step size %d, wait=%s...", step, wait)
local steps_front = 0
while lens.focus(1,step,true) do
console.write(".")
steps_front = steps_front + 1
end
printf("")
printf("Focus distance: %s", lens.focus_distance)
msleep(500)
printf("Focusing backward with step size %d...", step)
local steps_back = 0
while lens.focus(-1,step,true) do
console.write(".")
steps_back = steps_back + 1
end
printf("")
printf("Focus distance: %s", lens.focus_distance)
msleep(500)
msleep(500)
printf("Focus range: %s steps forward, %s steps backward. ", steps_front, steps_back)
printf("Focus range: %s steps forward, %s steps backward. ", steps_front, steps_back)
end
end
printf("Focus test completed.")
else
......
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