Quote- 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.IIRC the "do something" can be as simple as opening and closing the func menu. Presumably there's an underlying function somewhere that has the same effect, but it didn't seem like a big deal to me.
- 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.
--[[@title Display On/Off Test--]]set_console_layout(1, 1, 44, 6) print("Test started")print(" - press any key to toggle display")print(" - press menu to exit")lcd_state = 1repeat repeat wait_click(100) until not( is_key("no_key")) if ( lcd_state == 0 ) then lcd_state = 1 else lcd_state = 0 end set_lcd_display(lcd_state) print("display="..lcd_state)until is_key("menu")set_lcd_display(1) print("menu key exit")
function restore_display() local disp = get_prop(props.DISPLAY_MODE) local clicks=0 repeat click("display") clicks=clicks+1 sleep(500) until (( disp == get_prop(props.DISPLAY_MODE)) or (clicks> 5))end
Update : a little function to toggle the display clears this up - but it introduces a lag and seem like overkill :
The alternative is to go hunting in the firmware for a function to force the display to refresh.
Curiously, as I was playing with this, I noticed that the display overlays seem to restore when the script exits. Can't figure out why that is different but somehow it is.
I'm out of CHDK mode at the moment, but I didn't have this problem with my display off CHDK patch. One possibility is that I call: gui_set_need_restore() when I turn off the display. Does Phil's new function do that? CHDK may not be sensing that it needs to draw itself after the display comes back on because the screen buffer hasn't changed.
Update: screen now redraws properly when set_lcd_display(0) is called! Patch file attached.
Update: seems to make a big difference - screen now redraws properly when set_lcd_display(1) is called - although I added it to where it turns on the display! Patch file attached. Thanks to lapser!
This fixes the issue on for me on d10, not on a540.
...Issues I've seen so far:- Switching between rec and play with the display off seems to crash....
On further testing, I'm not sure the crashing on mode switch with display off was real. I was able to do it a few times (using the original DispCon_ functions, not the Switch* mentioned above) on a540 without seeing it again.
--[[@title set_lcd_display test@chdk_version 1.4# led 0 "Status LED" { 0 1 2 3 4 5 6 7 8 }--]]function blink( count ) sleep(2000) for i=1,count,1 do set_led(led,1) sleep(200) set_led(led,0) sleep(100) end sleep(2000)endblink(1)set_record(true) -- switch to shooting modeblink(2)set_lcd_display(false)blink(3)set_record(false) -- switch to playback modeblink(4)set_lcd_display(true)blink(5)
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