MD_NO_SHUTTER_RELEASE_ON_SHOOT=8
--[[--@title Bulb.lua @chdk_version 1.4@param t timer @default t 10 @range t 1 1000@param f faktor sec/10 @default f 10 @range f 1 10000@param k Keymode @default k 0 @values k --- shoot/2 --]]--function bulb(B,key) local T,h=get_tick_count()if key then while is_pressed(key) do print(B,key) while md_detect_motion(5,5,5,1000,30,0,3,h,0,0,0,0,0,25,5,1)==0 do O=O end while is_pressed(key) do sleep(10) end release("shoot_full_only") endelse print(B) while md_detect_motion(5,5,5,1000,30,0,3,h,0,0,0,0,0,25,5,1)==0 do O=O end repeat sleep(10) until T+B>=get_tick_count() release("shoot_full_only")endreturn get_tick_count()-Tendexc=get_exp_count()press("shoot_half")repeat sleep(10) until not get_shooting()print(bulb(t*f*100,k==1 and "shoot_half"))release("shoot_half")while exc==get_exp_count() do sleep(100) end
Bottom line: may I suggest you ‘just’ extend the table to cover out to 1/4000 and keep the table as is at the other end, ie 250s. This should at least cover the non BULB use.
I have added the extra entries up to 1/4000s into the XIMR build. If this is what you want I will add it the main SVN repo.
Many thanks, that fixes things...unless there is a CHDK camera with a shutter faster than 1/4000: but I'm sure there isn't.
This is why I suggested adding a BULB entry to catch the BULB apex96 shutter that seems to be returned, ie 32767 - at least on the 11-22mm EFM lens.In other words, the final entry will be to catch shutters faster than 1/4000, which is the BULB A bit messy I know.
As I've been trying to say, handling bulb in a coherent way requires more than just adding something to the table. The existing logic has no concept of a table entry that doesn't refer to a specific shutter speed.It would be worthwhile to make the code do something reasonable for bulb mode, but that requires coming up with a specific, desired behavior for the various cases where it might be encountered.
if (temp_s > 1152 or temp_s < -480) then temp = "BULB" else temp = tv_str[qqq+16].."s" end
Each camera has its own table, so this would only affect m3 in any case.
const ShutterSpeed shutter_speeds_table[] = { { -24, -768, "250", 250000000 }, { -23, -736, "200", 200000000 }, { -22, -704, "160", 160000000 }, { -21, -672, "125", 125000000 }, { -20, -640, "100", 100000000 }, { -19, -608, "80", 80000000 }, { -18, -576, "60", 60000000 }, { -17, -544, "50", 50000000 }, { -16, -512, "40", 40000000 }, { -15, -480, "30", 30000000 }, { -14, -448, "25", 25000000 }, { -13, -416, "20", 20000000 }, { -12, -384, "15", 15000000 }, { -11, -352, "13", 13000000 }, { -10, -320, "10", 10000000 }, { -9, -288, "8", 8000000 }, { -8, -256, "6", 6000000 }, { -7, -224, "5", 5000000 }, { -6, -192, "4", 4000000 }, { -5, -160, "3.2", 3200000 }, { -4, -128, "2.5", 2500000 }, { -3, -96, "2", 2000000 }, { -2, -64, "1.6", 1600000 }, { -1, -32, "1.3", 1300000 }, { 0, 0, "1", 1000000 }, { 1, 32, "0.8", 800000 }, { 2, 64, "0.6", 600000 }, { 3, 96, "0.5", 500000 }, { 4, 128, "0.4", 400000 }, { 5, 160, "0.3", 300000 }, { 6, 192, "1/4", 250000 }, { 7, 224, "1/5", 200000 }, { 8, 256, "1/6", 166667 }, { 9, 288, "1/8", 125000 }, { 10, 320, "1/10", 100000 }, { 11, 352, "1/13", 76923 }, { 12, 384, "1/15", 66667 }, { 13, 416, "1/20", 50000 }, { 14, 448, "1/25", 40000 }, { 15, 480, "1/30", 33333 }, { 16, 512, "1/40", 25000 }, { 17, 544, "1/50", 20000 }, { 18, 576, "1/60", 16667 }, { 19, 608, "1/80", 12500 }, { 20, 640, "1/100", 10000 }, { 21, 672, "1/125", 8000 }, { 22, 704, "1/160", 6250 }, { 23, 736, "1/200", 5000 }, { 24, 768, "1/250", 4000 }, { 25, 800, "1/320", 3125 }, { 26, 832, "1/400", 2500 }, { 27, 864, "1/500", 2000 }, { 28, 896, "1/640", 1563 }, { 29, 928, "1/800", 1250 }, { 30, 960, "1/1000", 1000 }, { 31, 992, "1/1250", 800 }, { 32, 1024, "1/1600", 625 }, { 33, 1056, "1/2000", 500 }, { 34, 1088, "1/2500", 400 }, { 35, 1120, "1/3200", 312 }, { 36, 1152, "1/4000", 250 }, { 37, 1156, "BULB", 0 },};
Following from my last post, surely the following will act as the master Tv table for all cameras,
as if a camera has BULB then user_tv will be 32767 and if no BULB on a camera the algorithm will simply find the correct table entry.
Started by jamesgreaves Script Writing
Started by tomk358 DSLR Hack development
Started by bugsplatter « 1 2 » Script Writing
Started by GeekStyle59 General Help and Assistance on using CHDK stable releases
Started by salukikev Script Writing