CHIMP - Canon Hack Installation and Management Platform - page 10 - General Discussion and Assistance - CHDK Forum

CHIMP - Canon Hack Installation and Management Platform

  • 138 Replies
  • 88380 Views
*

Offline reyalp

  • ******
  • 14128
Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #90 on: 27 / June / 2017, 23:19:04 »
Advertisements
I'm referring to the text at the bottom of the camera display consisting of the script title and "<ALT>", the latter against a screaming red background.
This happens because (to keep some UI behavior consistent) CHDK enters alt mode every time it runs a PTP script (regular scripts can only be started from alt mode, so this isn't an issue). Since by default chdkptp uses script to check that the path is valid, it flickers for every file. It's not intended as a status indicator, but it's not really a bug either.

Quote
It doesn't ATM, since I didn't get to hacking the UMENU.CFG format just yet. Once it does, it will need to somehow obtain a full list of the available menu items. Providing it is the sole purpose of menumeta.flt.
I would argue that this should be exposed through script. This sticks to the philosophy of keeping the bare minimum in the raw PTP protocol, and would also allow camera side scripts to manipulate the user menu.

In this case, you shouldn't need to edit the cfg file at all.

Quote
As if that wasn't enough, I'm using S3 IS for testing, and it's been giving me hell. I'm getting Response Code 0x1001, which AFAIK isn't even a valid RC.

Quote
Incidentally, chdkptp blatantly refuses to display the camera in the device list. Could the reason lie with the vxWorks PTP port having some serious quirks?
To be clear, your client shows the camera, but chdkptp does not?

VxWorks cameras should work fine, however there is a quirk that the libusb driver must be installed for each physical USB port you use. If you install the driver, and then plug the camera into a different port, you need to re-install the driver. AFAIK this quirk applies to cameras that don't provide a serial number over USB, which includes most (if not all) vxworks cameras.
Don't forget what the H stands for.

Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #91 on: 29 / June / 2017, 20:43:52 »
This happens because (to keep some UI behavior consistent) CHDK enters alt mode every time it runs a PTP script (regular scripts can only be started from alt mode, so this isn't an issue). Since by default chdkptp uses script to check that the path is valid, it flickers for every file. It's not intended as a status indicator, but it's not really a bug either.

I wouldn't call it a bug, only minor annoyance, which could become a major one when 150 files are being uploaded. However, is the use of script mandatory for uploading?

Quote
I would argue that this should be exposed through script. This sticks to the philosophy of keeping the bare minimum in the raw PTP protocol, and would also allow camera side scripts to manipulate the user menu.

Well, this philosophy sounds great in theory, but IMHO doesn't translate that well in this particular case.

Quote
To be clear, your client shows the camera, but chdkptp does not?

That's precisely what happens.

Quote
VxWorks cameras should work fine, however there is a quirk that the libusb driver must be installed for each physical USB port you use.

I installed the WinUsb driver with that very same camera being connected to that very same port (albeit via a USB hub). Both chdkptp and mweerden's client work OK (the latter is getting exception events from the driver, but those have been safe to ignore so far) with two other cameras.
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline reyalp

  • ******
  • 14128
Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #92 on: 30 / June / 2017, 00:03:29 »
I wouldn't call it a bug, only minor annoyance, which could become a major one when 150 files are being uploaded.
I don't see how this would be a major annoyance. The alt label flickers. So?

You can actually avoid the flickering by entering alt mode first, manually or using enter_alt, but personally I find it nice to be able to see that something is happening.
Quote
However, is the use of script mandatory for uploading?
You can upload a file without Lua (PTP_CHDK_UploadFile in the protocol, -nolua in chdkptp). However, checking for existing files, creating directories, setting timestamps, attributes all require Lua, so the default upload commands do use it. The chdkptp multi file upload / download functions all require Lua.
Quote
Well, this philosophy sounds great in theory, but IMHO doesn't translate that well in this particular case.
I'd need a more specific argument before I consider adding something to the PTP protocol.

Quote
I installed the WinUsb driver with that very same camera being connected to that very same port (albeit via a USB hub).
Note that WinUsb and libusb-win32 are different. chdkptp requires the latter.
Don't forget what the H stands for.

Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #93 on: 30 / June / 2017, 19:02:38 »
You can upload a file without Lua (PTP_CHDK_UploadFile in the protocol, -nolua in chdkptp). However, checking for existing files, creating directories, setting timestamps, attributes all require Lua, so the default upload commands do use it. The chdkptp multi file upload / download functions all require Lua.

But those are scripts that are injected into ExecuteScript for every file.
Would it be possible to upload the files first and then generate Lua code to update all the timestamps in a single call?
Will UploadFile create a target directory if it doesn't exist?

Quote
I'd need a more specific argument before I consider adding something to the PTP protocol.

I suppose if it were possible to do something like
Code: [Select]
load_module("unzip", "CHDK.zip")
in script, there would be no need for extending the PTP protocol. However, I strongly suspect that adding something like that to Lua would be much harder.

Quote
Note that WinUsb and libusb-win32 are different. chdkptp requires the latter.

I believe the other cameras use the same driver.
« Last Edit: 30 / June / 2017, 19:05:10 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline reyalp

  • ******
  • 14128
Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #94 on: 01 / July / 2017, 00:18:18 »
But those are scripts that are injected into ExecuteScript for every file.
So?
Quote
Would it be possible to upload the files first and then generate Lua code to update all the timestamps in a single call?
Sure. You'd probably want to batch them to avoid potentially running out of memory on large numbers of files.

mupload could be optimized a bit just by combining the various stat and mkdir calls for each file. There's even a TODO for it ;)

But really, script execution overhead is fairly small.

Quote
Will UploadFile create a target directory if it doesn't exist?
No. It literally just does open / write / close.

Quote
Quote
I'd need a more specific argument before I consider adding something to the PTP protocol.
I suppose if it were possible to do something like
Code: [Select]
load_module("unzip", "CHDK.zip")
in script, there would be no need for extending the PTP protocol. However, I strongly suspect that adding something like that to Lua would be much harder.
OK, I was confused.  I thought the functionality you were referring to was getting the list of menu IDs for your user menu editor.

I definitely do not see the point of adding CHDK PTP protocol to load a modules that unzips a file. The existing upload system works fine, there's no reason to add complexity to the protocol or core for this.

I think your example would actually be relatively easy to add, and would have applications beyond PTP. You'd have a class of modules that effectively act like a command line programs: i.e. invoke once with simple string parameters, block Lua until it's done, return values in some simple format. This could be used for unzipping, hashing, and who knows what else.

I'm not saying you should run off and implement it, but it's definitely the kind of building block approach I prefer.

Quote
I believe the other cameras use the same driver.
chdkptp is built with libusb-win32. If winusb somehow supports this, I don't know anything about it.
Don't forget what the H stands for.

Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #95 on: 05 / July / 2017, 02:09:16 »
0.9.4 - 2017-07-05
  • Restored full SDM support
  • Added SDM precise binary detection
  • Added SDM tips and User Manual option
  • Added CHDK camera-specific notes option
  • Added 400plus version formatting
  • Added SDHC/SDXC/microSD card check
  • Fixed SDM IXUS/SD/ELPH model names
  • Fixed Summary product name/version display
  • Various bugfixes and code improvements
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #96 on: 07 / July / 2017, 15:56:54 »
Here is a first attempt for a german translation. This is blind translation. I can not check the formating of the strings and the real sense of some words.

I have very little experience with ML and SDM.

A few hints:
In the German CHDK forum we call the CHDK development version "preview version".
The ALT mode button is not only the PRINT key. For cameras without a print key we have agreed, the PLAY button is the ALT mode key (The user can change this.).
For the Canon function of a camera button you must press the button longer (> 1 sec) and not hold. I think your description in CHIMP is not quite right.

msl
CHDK-DE:  CHDK-DE links

Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #97 on: 07 / July / 2017, 16:07:40 »
Here is a first attempt for a german translation.
Thank you!

Quote
I can not check the formating of the strings and the real sense of some words.
Actually, there's a way. You could create a satellite assembly with Visual/Xamarin studio (CHIMP.Resources.dll) and dump it in the de/ directory. Done, see attachment.

Quote
I have very little experience with ML and SDM.
So do I :)

Quote
In the German CHDK forum we call the CHDK development version "preview version".
Probably more appropriate, but "development" seems to be used everywhere (including the official download page).

Quote
The ALT mode button is not only the PRINT key. For cameras without a print key we have agreed, the PLAY button is the ALT mode key (The user can change this.).
Wait till the next CHIMP version ;)

Quote
For the Canon function of a camera button you must press the button longer (> 1 sec) and not hold. I think your description in CHIMP is not quite right.
Good point. I'll fix that.

Edit: I'm attaching a Visual Studio solution that will build German and Russian satellite assemblies. After it does, copy the de/ directory into CHIMP's working directory.
« Last Edit: 07 / July / 2017, 20:44:46 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #98 on: 07 / July / 2017, 20:23:55 »
As I suspected, there are many strings in German that don't fit; see screenshots.

Although the widths of some controls could be adapted (e.g. the Go Back button), some widths are fixed (e.g. the step names). The summary could be changed to wrap the tips, but that wouldn't be pretty.

Would it be possible to shorten those strings?
« Last Edit: 07 / July / 2017, 20:50:41 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHIMP - Canon Hack Installation and Management Platform
« Reply #99 on: 08 / July / 2017, 08:37:34 »
Would it be possible to shorten those strings?
I will try it. Maybe I find other synonyms for words, that are too long.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics


SimplePortal © 2008-2014, SimplePortal