Is it possible to change the position of the ALT-key for an IXUS 240 HS?

  • 14 Replies
  • 595 Views
Advertisements
Greetings!

I'm hoping to use CHDK to resurrect my IXUS 240 HS. The problem is that the touch screen has become so badly out of alignment that  I can only access icons on the right hand side of the screen, which means I can't take videos, amongst many other things.

If I can get CHDK to work I should be able to use a phone or tablet to control the camera remotely.

However, after finally getting CHDK installed, the Alt-key icon, to activate it is ON THE BLOODY LEFT HAND SIDE OF THE SCREEN!  :'(

So I'm wondering if it's possible to move that key to the right hand side? I can code a bit, and would be happy to have a go at it myself if someone can point me in the right direction.

Thanks in advance for any help.


Cheers

*

Online reyalp

  • ******
  • 11496
If I can get CHDK to work I should be able to use a phone or tablet to control the camera remotely.
FWIW, CHDK doesn't really support control from a phone or tablet. You can control over USB using the PTP extension, but AFAIK there isn't a usable mobile client. If you are able to use PTP control, you shouldn't need to be able to activate alt from the camera.

Quote
So I'm wondering if it's possible to move that key to the right hand side? I can code a bit, and would be happy to have a go at it myself if someone can point me in the right direction.
The relevant code should be in platform/ixus240_elph320hs/kbd.c

Attached is a source patch that should swap the ALT and raw toggles. If you tell me which firmware version your camera has, I can post a build as well.

I don't have this camera or any other with touch support implemented, so I'm not sure it's correct. I'm also not sure if this will make the camera usable for you, since some other buttons are on the left side.
Don't forget what the H stands for.

If you are able to use PTP control, you shouldn't need to be able to activate alt from the camera.

You're right! I never thought to check that but I just tried ptpCamGui and it connected without any action on the camera.

Quote
FWIW, CHDK doesn't really support control from a phone or tablet. You can control over USB using the PTP extension, but AFAIK there isn't a usable mobile client.

Sorry I simplified a bit too much - if I can use CHDK to, for example, rearrange the screen interface, or turn on the WIFI (the icon for that is also on the left by default), then I can use standard Canon software to control it.


Quote
The relevant code should be in platform/ixus240_elph320hs/kbd.c

Attached is a source patch that should swap the ALT and raw toggles. If you tell me which firmware version your camera has, I can post a build as well.

I don't have this camera or any other with touch support implemented, so I'm not sure it's correct. I'm also not sure if this will make the camera usable for you, since some other buttons are on the left side.

Thanks so much for that. I'll see what I can do with ptp first, but eventually, I'm sure it would be useful to be able to enable CHDK from the camera.

*

Online reyalp

  • ******
  • 11496
Unfortunately, CHDK doesn't currently have the ability to send touch events to the Canon UI, doing things that require manipulating on-screen buttons might still be a problem. Many Canon UI actions may still be available using post_levent_to_ui , see http://chdk.wikia.com/wiki/Lua/Lua_Reference/Levent

It's possible that touch events can also be sent using post_levent_to_ui. There are names like "PressTouchPanel" but if they work, I don't know how the coordinates are passed.

Attached is a dump of ixus240 levent names.
Don't forget what the H stands for.


Thanks for that reyalp. Could you advise which software is the most straightforward for working with Lua?

I have used Lua a bit before (scripting Celestia) but have no idea of how to get starting using Lua with CHDK.

*

Online reyalp

  • ******
  • 11496
Thanks for that reyalp. Could you advise which software is the most straightforward for working with Lua?
I'm not sure what you are looking for. There isn't really a development environment for CHDK lua (the closest thing is probably https://chdk.setepontos.com/index.php?topic=12961.0)

For development / testing, I like to use chdkptp (https://app.assembla.com/spaces/chdkptp/wiki) to interactively send one liners to the camera and see the results. You can also edit files on your PC and run them.

Some useful resources:
List of almost all the functions available in CHDK Lua
http://chdk.wikia.com/wiki/CHDK_Scripting_Cross_Reference_Page

Introduction to chdkptp CLI
https://app.assembla.com/spaces/chdkptp/wiki/CLI_Quickstart


FWIW, I tried sending some touch levents on G7X and didn't see any response. That doesn't mean they don't work, touches must presumably have parameters like position and it's not clear how they would be passed.
Don't forget what the H stands for.

Thanks again for the quick response.  :)

For development / testing, I like to use chdkptp (https://app.assembla.com/spaces/chdkptp/wiki) to interactively send one liners to the camera and see the results. You can also edit files on your PC and run them.

Yes I'd just come to that conclusion myself! Sending one liners is exactly what I need to do for the moment.

Quote
FWIW, I tried sending some touch levents on G7X and didn't see any response. That doesn't mean they don't work, touches must presumably have parameters like position and it's not clear how they would be passed.

I probably won't need the touch events provided I can, for example, find a way to configure and start the wifi.

However, at the moment, I have a bigger problem. Regardless of how I start the camera, it goes into Play mode. I did actually get it going in Camera mode once, but as soon as I plugged in the usb, it reverted to Play mode. Once there, nothing I do on CHDK PTP seems to have any effect on the camera - except Reboot, which causes the camera to disconnect.

Should I start a new thread for this? It's moved a fair way from the stated topic.

I just found the problem about being stuck in Play mode!  :D

 It's in the Install section of the chdkptp wiki. I probably should have mentioned that I use Linux, and the problem seems to be something about interactions with default software.  :(

Thanks again for the link.


*

Online reyalp

  • ******
  • 11496
I just found the problem about being stuck in Play mode!  :D

 It's in the Install section of the chdkptp wiki. I probably should have mentioned that I use Linux, and the problem seems to be something about interactions with default software.  :(
If the screen on the camera goes black when you plug in the USB cable, it's almost certainly that problem. The udev stuff described https://app.assembla.com/spaces/chdkptp/wiki/Install has worked for me, but the details may vary depending on the distro.
Don't forget what the H stands for.

The udev stuff described https://app.assembla.com/spaces/chdkptp/wiki/Install has worked for me, but the details may vary depending on the distro.

Yes :)   I use OpenSuse Leap but the Fedora 27 fix worked like a charm. There was only a minor variation re the original 40-libgphoto2.rules. I'll sign up to the Wiki and provide that feedback.

Now, back to the main game of exploring Lua commands.  :D

 

Related Topics