extern unsigned _ExecuteEventProcedure(const char *name,...);//new set backlight function// 0 off | 1 on | -1 togglestatic void backlight(int newbl){ static int bl=1; //current backlight state starts out ON static int eproc=2; //0=use TurnOffBackLight() / 1=use event proc / 2=initial call if(newbl<0)newbl=bl^1; newbl&=1; if(newbl==bl)return; bl=newbl; if(eproc) { unsigned args[1]; if(eproc==2) //first call { eproc=1; args[0]=(unsigned)"DispDev_EnableEventProc"; if (call_func_ptr(_ExecuteEventProcedure,args,1)==-1) { args[0]=(unsigned)"DispDev.Create"; if (call_func_ptr(_ExecuteEventProcedure,args,1) == -1)eproc=0; } } if(eproc) { if(bl)args[0]=(unsigned)"DispCon_TurnOnDisplay"; else args[0]=(unsigned)"DispCon_TurnOffDisplay"; call_func_ptr(_ExecuteEventProcedure,args,1); return; } if(bl)TurnOnBackLight(); else TurnOffBackLight(); }}
--[[@title Backlight Test--]]press("shoot_full");repeat wait_click(10) if(is_key("set"))then set_backlight(-1) end if(is_key("video"))then Force_Error() enduntil is_key("menu")
lapser, I'd like to know more about your method of turning off the display. I've just been shoving a connector into the A/V port to make the display dark and prevent the flicker after each shot, but that doesn't seem to save much power. But just to be clear - does your method work for both autofocus and manual focus? Actually, I never understood why the camera turned off manual focus when you turn off the display. Do you understand why it does that? And if there's a good reason, how does your method get around it?
'believe' was a careless use of words, my conclusions are not based on belief but on practical experience and the hard data presented above.By all means ignore the technical conclusions drawn from the data if you feel more comfortable with that.
But after changing that setting, I ran the script. It did turn off the display, and then turned it back on. But when it came back on, all of the normal info overlays were gone, and there didn't appear to be a way to get them back.
it appears to work with respect to MF, but I need my overlays back.
--[[@title Display On/Off Test--]]sleep(2000)set_LCDdisplay(0)sleep(2000)set_LCDdisplay(1)console_redraw()
After thinking about it, I agree with reyalp that the display off function is different from the set_backlight(0) function. The display function seems to turn off the power to the display providing more power saving and stopping the flashing between pictures, but it takes longer to turn it back on. It's possible that someone will want to have the backlight come on immediately, and we may figure out a better fix for the backlight flashing problem in the future.So I'll do this as a new function:set_display(-1 | 0 | 1)-1 toggles the display on and off. I'll also add this to set_backlight. This is usually what a script will want to do, i.e. when you press the SET key.I'm still looking for some help on how to add the 2 new display functions to CHDK without using event_proc. Can anyone point me in the right direction? It looks like I could add them to stubs.s for my specific cameras, but is there a way to add them to other cameras automatically?
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