@title MD Lightning6@param a Columns@default a 6@param b Rows@default b 4@param c Threshold (0-255)@default c 10@param d Compare Interval (millisecs)@default d 1@param e Trigger Delay (0.1 secs)@default e 12@param f Rows to Exclude@default f 0@param g Pix-Step(speed/accuracy adj)@default g 8@param h Reg Mode(0-no,1-incl,2-excl)@default h 0@param i Measure Mode(1-Y,0-U,2-V)@default i 1if a<1 then a=1if b<1 then b=1if c<0 then c=0if g<1 then g=1if f<1 then f=1e=e*100print ">[";a;",";b;"] threshold: ";cx=30000:mdpress "shoot_half"t=0domd_detect_motion a, b, i, x, d, c, 1, t, h, 1, 1, a, f, 0, g, euntil t>0click "shoot_full"goto "md"
--[[@title MD Lightning6@param a Columns@default a 6@param b Rows@default b 4@param c Threshold (0-255)@default c 10@param d Compare Interval (millisecs)@default d 1@param e Trigger Delay (0.1 secs)@default e 12@param f Rows to Exclude@default f 0@param g Pix-Step(speed/accuracy adj)@default g 8@param h Reg Mode(0-no,1-incl,2-excl)@default h 0@param i Measure Mode(1-Y,0-U,2-V)@default i 1]]if a<1 then a=1 endif b<1 then b=1 endif c<0 then c=0 endif g<1 then g=1 endif f<1 then f=1 ende=e*100print(">["..a..","..b.."] threshold: "..c)x=30000repeatsleep(0)press("shoot_half")t=0repeatsleep(0)md_detect_motion(a, b, i, x, d, c, 1, t, h, 1, 1, a, f, 0, g, e)until t>0click("shoot_full")until 1<0
As for Lua version, it could be something like this:Code: [Select]...repeatsleep(0)press("shoot_half")t=0repeatsleep(0)md_detect_motion(a, b, i, x, d, c, 1, t, h, 1, 1, a, f, 0, g, e)until t>0click("shoot_full")until 1<0...but md_detect_motion isn't implemented in Lua yet.
...repeatsleep(0)press("shoot_half")t=0repeatsleep(0)md_detect_motion(a, b, i, x, d, c, 1, t, h, 1, 1, a, f, 0, g, e)until t>0click("shoot_full")until 1<0
You don't need a dummy sleep in loops anymore.
As I understand it, you have changed all uBasic commands to work like 'val = func x y z'?
Have you done the same thing with md_detect_motion? If so I could reuse this code in binding md_detect_motion to Lua.
Started by unrequited RAW Shooting and Processing
Started by StevenD RAW Shooting and Processing
Started by reyalp General Discussion and Assistance
Started by waterwingz « 1 2 ... 5 6 » General Discussion and Assistance
Started by genosmm RAW Shooting and Processing