Disable Lens / zoom with LUA? - LUA Scripting - CHDK Forum

Disable Lens / zoom with LUA?

  • 1 Replies
  • 3537 Views
Disable Lens / zoom with LUA?
« on: 10 / January / 2012, 22:14:25 »
Advertisements
I wonder if it is possible to remove the front lens and zoom gear module from a powershot and use the ccd chip and back of the camera for other purposes.On a youtube video a fellow disassemble a powershot to remove a cathair from the lens, so mechanical the procedure is possible.
I believe the camera's boot up self test will return a lens or other mechanical error if the lens/zoom module has been removed. The primitive LUA script below does not work,when run it prints: :3: name or '...' expected near "MechaUnRegisterEventProcedure" Press Shutter To Close. Any suggestions very appreciated

Code: [Select]
function call_event_proc("MechaUnRegisterEventProcedure")
print ("disabeling mechanical system")
sleep(3000) 
end

« Last Edit: 10 / January / 2012, 22:40:47 by polle »

*

Offline reyalp

  • ******
  • 14080
Re: Disable Lens / zoom with LUA?
« Reply #1 on: 10 / January / 2012, 23:45:00 »
I believe the camera's boot up self test will return a lens or other mechanical error if the lens/zoom module has been removed.
Very likely.
Quote
The primitive LUA script below does not work,when run it prints: :3: name or '...' expected near "MechaUnRegisterEventProcedure" Press Shutter To Close. Any suggestions very appreciated
Code: [Select]
function call_event_proc("MechaUnRegisterEventProcedure")
The "function" is a mistake, it tells you lua you are trying to create a new function called call_event_proc and  putting a constant string in the parameter list. call_event_proc is already a function, so correct usage would be
Code: [Select]
call_event_proc("MechaUnRegisterEventProcedure")However, this will not help you. MechaUnRegisterEventProcedure would just unregister some eventprocs, it won't do what you want. Even if those functions were responsible for the error detection, almost all of the normal canon code calls functions directly, without going through the eventproc interface.

There have been some discussions of how to get the cameras to work without lenses, for example http://chdk.setepontos.com/index.php?topic=6725.0
Don't forget what the H stands for.

 

Related Topics