supplierdeeply

Porting a camera sx530hs

  • 286 Replies
  • 62324 Views
Re: Porting a camera sx530hs
« Reply #280 on: 07 / June / 2018, 09:08:48 »
Advertisements
Hello

I've been successful porting the preview to my application after lots of tests.

On stubs_min.S
Code: [Select]
DEF(active_viewport_buffer, 0x22d08  )
DEF(viewport_buffers, 0xFF63DFE8  )
they work really well and they came within the current trunk.

On lib.c

Code: [Select]
return viewport_buffers[(active_viewport_buffer+5)&6];
This was the most stable i could get.

Right now how can i disable the camera to turn off/idle/sleep/standby, after a while .Any suggestions ?

Cheers

Innie


*

Offline srsa_4c

  • ******
  • 3688
Re: Porting a camera sx530hs
« Reply #281 on: 07 / June / 2018, 12:15:53 »
Code: [Select]
return viewport_buffers[(active_viewport_buffer+5)&6];
If all 8 buffers are in use, the &6 effectively halves the number of reported frames.

It might be a good idea to fix that in the official source (possibly with &7, if anyone can confirm that all buffers are used).
Quote
Right now how can i disable the camera to turn off/idle/sleep/standby, after a while .Any suggestions ?
See the possible choices in the CHDK menu: CHDK Settings -> Disable LCD Off

Re: Porting a camera sx530hs
« Reply #282 on: 08 / June / 2018, 07:36:15 »
I need to literally code it in the CHDK.The camera should never idle/stand by.

If i leave it for 4 hours(with a power source) on preview it should stay on preview. (think a surveillance camera).

I've "grep'd the whole trunk trying to find some piece of code to disable it and i coudn't find it.

Any suggestions  ?

Cheers

Innie


« Last Edit: 08 / June / 2018, 07:49:14 by innie10032 »

*

Offline srsa_4c

  • ******
  • 3688
Re: Porting a camera sx530hs
« Reply #283 on: 08 / June / 2018, 12:28:54 »
I need to literally code it in the CHDK.The camera should never idle/stand by.

If i leave it for 4 hours(with a power source) on preview it should stay on preview. (think a surveillance camera).

I've "grep'd the whole trunk trying to find some piece of code to disable it and i coudn't find it.

Any suggestions  ?

Cheers

Innie
CHDK Settings -> Disable LCD Off [Always]
Additionally, disable auto power off and other power saving options in Canon menu (these may not even be necessary, but will not hurt).


Re: Porting a camera sx530hs
« Reply #284 on: 11 / June / 2018, 09:45:43 »
I've found it !

On trunk/core/conf.c

There's a piece of code you need to comment.

Code: [Select]
void conf_update_prevent_shutdown(void) {
    //if(conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALWAYS
    //    || (conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALT && !camera_info.state.gui_mode_none)
    //    || (conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALT_SCRIPT && camera_info.state.state_kbd_script_run)) {
        disable_shutdown();
    //} else {
    //    enable_shutdown();
    //}
}

Now the camera wont shutdown/standby/idle anymore  :D :D :D

*

Online blackhole

  • *****
  • 589
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #285 on: 11 / June / 2018, 10:49:19 »
I've found it !

On trunk/core/conf.c

There's a piece of code you need to comment.

Code: [Select]
void conf_update_prevent_shutdown(void) {
    //if(conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALWAYS
    //    || (conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALT && !camera_info.state.gui_mode_none)
    //    || (conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALT_SCRIPT && camera_info.state.state_kbd_script_run)) {
        disable_shutdown();
    //} else {
    //    enable_shutdown();
    //}
}

Now the camera wont shutdown/standby/idle anymore  :D :D :D
I no longer have this camera, but have you tried these settings in the Canon menu + CHDK Settings -> Disable LCD Off [Always]

Re: Porting a camera sx530hs
« Reply #286 on: 11 / June / 2018, 15:06:02 »
Yes i tried, it worked, i just needed something permanent.

 

Related Topics