if call_event_proc'DispDev_EnableEventProc' == -1 then if call_event_proc'DispDev.Create' == -1 then error'eventprocs not found' endendcall_event_proc'DispCon_TurnOffDisplay'-- do whatever you want to do while the display is offcall_event_proc'DispCon_TurnOnDisplay'
if call_event_proc('DispDev_EnableEventProc') == -1 then if call_event_proc('DispDev.Create') == -1 then error('eventprocs not found') endendcall_event_proc('DispCon_TurnOffDisplay')-- do whatever you want to do while the display is offcall_event_proc('DispCon_TurnOnDisplay')
The live view remains active, so this will not have the battery saving of the modes that turn the sensor off.
Quote from: reyalp on 14 / August / 2013, 01:06:06The live view remains active, so this will not have the battery saving of the modes that turn the sensor off. So it should be better than just turning off the backlight but not as good as using the DISP key to turn off the display in cams with an OVF ?
@outslider:parens are optional in Lua if the argument is a single string or table, saves a few bytes
D10 does not have a native display off mode. I'd like to know if it works on other cameras like this, and whether anyone sees any side effects.
--[[@title Display On/Off Test--]]set_console_layout(0, 0, 44, 10)print("started")if call_event_proc'DispDev_EnableEventProc' == -1 then if call_event_proc'DispDev.Create' == -1 then error'eventprocs not found' endendsleep(1000)print("turning off the display and shooting")sleep(2000)call_event_proc'DispCon_TurnOffDisplay'sleep(2000)shoot()sleep(3000)call_event_proc'DispCon_TurnOnDisplay'print("display back on")sleep(1000)
Issues I've seen so far:- Switching between rec and play with the display off seems to crash.- if you turn the display off and on in play mode, the review picture is no longer visible. Switching images makes it show again.- the bitmap ui overlay (both chdk and canon) may not display after turning on, until you do something that causes the canon firmware to refresh it.
Assuming this works widely, I think we should add it as a standard script function so people don't have to enable native calls.
The first issue is unfortunate .. at a minimum we will need to document it I guess.
And by doing so, it can be a uBASIC function too ?
It may be worth tracking the set display state in script, so it could be restored if there is a script error. We could also turn it on before doing a mode switch, but I think the script would have to be responsible for turning it back off, since the actual switch isn't necessarily complete when the call returns.
I'd be tempted to use display_off and display_on.
Quote from: reyalp on 14 / August / 2013, 22:35:16It may be worth tracking the set display state in script, so it could be restored if there is a script error. We could also turn it on before doing a mode switch, but I think the script would have to be responsible for turning it back off, since the actual switch isn't necessarily complete when the call returns.I was thinking about that too rather than just document it. Probably hard to get 100% right but 90% might be good enough.
Started by Michael L General Help and Assistance on using CHDK stable releases
Started by danielkun General Help and Assistance on using CHDK stable releases
Started by bugsplatter Script Writing
Started by vihar1 « 1 2 » General Discussion and Assistance
Started by muhlisgursoy General Discussion and Assistance