ixus175_elph180_100c porting attempt - page 5 - DryOS Development - CHDK Forum  

ixus175_elph180_100c porting attempt

  • 201 Replies
  • 101333 Views
Re: ixus175_elph180_100c porting attempt
« Reply #40 on: 28 / March / 2017, 23:27:22 »
Advertisements
@Camera_Noob Make sure you installed jre and set PATH Variable correctly.

@reyalp Camera take a picture and saved on sdcard. Every thing run on win7. On CHDKPTP  if double click shoot half button it show "ERROR: a script is already running" but not take a picture. Press another button it blink "Delayed Single Shot <ALT>" on bottom left corner a half second. Camera screen not go black when you plug in USB cable. PS3:0x4400033 change to 0x14400033. Press Play button on camera go to ALT mode PS3:0x4400037 change to 0x14400037.

On ixus160 it can AFL and AEL by shoot half+left and shoot half+right respectively but it can't on ixus175.


*

Offline reyalp

  • ******
  • 14080
Re: ixus175_elph180_100c porting attempt
« Reply #41 on: 29 / March / 2017, 13:16:31 »
@reyalp Camera take a picture and saved on sdcard. Every thing run on win7. On CHDKPTP  if double click shoot half button it show "ERROR: a script is already running" but not take a picture.
with chdkptp, did you get the camera in record mode? You should get a different error if not, but there could be problem with get_mode()

Assuming yes this means using script key press work, but shoot() does not.

If you use
shoot()
in a script, does it take a picture and then hang, or not take a picture at all?

Generally, if key presses work, it's likely to be a problem with PROPCASE_SHOOTING or the raw hook.

PROPCASE_SHOOTING behave like:

no shoot keys pressed, shooting not in progress = 0
half shoot pressed, autofocus and auto exposure ready >= 1
shot finished = 0

You can check with a script, get the propcase before shooting, immediately after pressing half shoot, half a second after pressing halfshoot, after clicking full shoot, and so on.

As I mentioned before, on G7 X and some other digic 6 cameras the old propcase shooting doesn't exist, so a workaround is needed. See https://chdk.setepontos.com/index.php?topic=12692.msg126797#msg126797
Your problem doesn't sound exactly like this.

If PROPCASE_SHOOTING seems OK, check that raw_process gets called
Don't forget what the H stands for.

*

Offline blackhole

  • *****
  • 937
  • A590IS 101b
    • Planetary astrophotography
Re: ixus175_elph180_100c porting attempt
« Reply #42 on: 29 / March / 2017, 14:07:03 »
Quote
I'm try modify  a few thing. shoot.lua can show "start" and take an image but not show "finish". After show "start" and take an image it's wait for press half shoot and release to show "finish".
Code: [Select]
From #define KEYS_MASK2 0x00000036
to #define KEYS_MASK2 0x00000034
and comment { 2, KEY_SHOOT_FULL_ONLY ,0x00000002 },
You definitely need #define KEYS_MASK2 0x00000033 in platform_kbd.h file, not 36 or 34.
If you use lib.c file from this link: https://chdk.setepontos.com/index.php?topic=13045.msg131958#msg131958 , replace
Code: [Select]
char *hook_raw_image_addr()
{
//FFB7C910 (search for CRAW BUFF)
    return (char*) 0x43737E20;
}
with
Code: [Select]
char *hook_raw_image_addr()
{
//FFB7C910 (search for CRAW BUFF)
    return (char*) 0x43727660;
}
see stubs_entry.S

Re: ixus175_elph180_100c porting attempt
« Reply #43 on: 04 / April / 2017, 11:05:25 »
Apply last key mask from blackhole. In preview mode, run script by shot press full
Code: [Select]
press('shoot_half')
sleep(1000)
press('shoot_full')
sleep(1500)
release('shoot_full')
it's show start/finish but no len extend or shutter sound and not take picture. if start script by long press full it show start and finish. it able to extend len and take a picture correctly.


*

Offline srsa_4c

  • ******
  • 4451
Re: ixus175_elph180_100c porting attempt
« Reply #44 on: 04 / April / 2017, 11:57:03 »
Apply last key mask from blackhole. In preview mode, run script by shot press full
Code: [Select]
press('shoot_half')
sleep(1000)
press('shoot_full')
sleep(1500)
release('shoot_full')
it's show start/finish but no len extend or shutter sound and not take picture. if start script by long press full it show start and finish. it able to extend len and take a picture correctly.
Can you share your latest source? I have done the boot.c part of the additional keyboard task override, I'd like to try the kbd.c part next.

Re: ixus175_elph180_100c porting attempt
« Reply #45 on: 04 / April / 2017, 20:39:06 »

*

Offline srsa_4c

  • ******
  • 4451
Re: ixus175_elph180_100c porting attempt
« Reply #46 on: 05 / April / 2017, 20:40:06 »
my last source code: https://drive.google.com/open?id=0B4ujGHeVgSW0dC1zU012SkxsN00
Attached are 2 changed files (I hope it will work, I did not try to compile). Don't forget to comment the task overrides after you re-generate boot.c.

Re: ixus175_elph180_100c porting attempt
« Reply #47 on: 06 / April / 2017, 05:56:33 »
@srsa_4c Thank you so much. It's worked. Just try run some script found that shoot() take picture twice. I try to under stand kbd in m10 port and your ixus175 kbd update code. It's very complicate for me. How to well done like that? ???


*

Offline srsa_4c

  • ******
  • 4451
Re: ixus175_elph180_100c porting attempt
« Reply #48 on: 08 / April / 2017, 10:48:46 »
@srsa_4c Thank you so much. It's worked. Just try run some script found that shoot() take picture twice.
IIRC that happens when the capt_seq overrides are missing.
Quote
I try to under stand kbd in m10 port and your ixus175 kbd update code. It's very complicate for me. How to well done like that? ???
You don't need the m10 port's kbd.c any more. I only pointed you to it because that's the "reference" implementation for cameras that sample the keyboard more than once per cycle. The m10 kbd.c also has to handle inverted buttons and the rotating "front dial". Your camera doesn't have them, so your kbd.c is much simpler and can use more generic routines from core/kbd_common.c .

Re: ixus175_elph180_100c porting attempt
« Reply #49 on: 14 / April / 2017, 08:37:02 »
On CHDKPTP after
Quote
  lua post_levent_to_ui(4484)
it can click left, right, up, down, set, menu and erase but set, menu button active original menu instead chdk menu. rec, shoot and shoot half no respond even physical button.
On ptpCamGui  it show "get_mode(): false".
Code: [Select]
capmode=require("capmode")
print("mode#",capmode.get(),"name",capmode.get_name(),"prop",capmode.get_canon())
if capmode.valid("P") then
    capmode.set("P")
end
result
Quote
when connected usb mode# 0 name PLAY prop 32773 
without usb and in rec mode before script start mode# 2 name PLAY prop 32773

Try get_mode()
Code: [Select]
rec,vid,mode=get_mode()
print("rec:",rec,"vid:",vid)
print("mode:",mode,tostring(modestrings[bitand(mode,0xFF)])) -- 0xFF is MODE_SHOOTING_MASK
sleep(2000)
Quote
with usb or in preview mode rec: false vid: false mode: 514 P
without usb in rec mode before startup script rec : true vid: false mode: 258 P

setmode.lua and setrec.lua not work too.
How to enable rec mode when usb connected?
Thank you.


 

Related Topics