some comments:
TEST 'function usb_msg_table_to_string(arg)':
The function fails is arg not a table.
In my code, this function is called automatically, and only if the argument is a table. See luascript.c lua_create_usb_msg
Users shouldn't need to call it.
TEST script id and results:
Very good idea, but how much results are from current id and how much from script-id 24?
For example we can use a text 'message' to separate old id from current id?
<conn> lua return '1'
<conn> lua return '1\n2'
<conn> lua return '1\n2\n3'
<conn> lua return '1\n2\n3\n4'
<conn> getm
message from unexpected script id 22
1
...
This is one of the features that's mostly intended for the new client, I only put enough in ptpcam to test.
I tried to not change the output to much so I wouldn't break ptpcamgui. If you want to change the output, that's fine with me.
It would be easy to make this more friendly to parse, I suggest:
- output script id when script starts
- output script id and and message type for each message
example (fake
)
<conn> lua return '1'
script:22
<conn> lua return '1\n2'
script:23
<conn> lua write_usb_msg('hi')
script:24
<conn> lua return 2
script:25
<conn> getm
22 return string:"1"
23 return string:"1
2"
24 message string:"hi"
25 return number:1
Of course you should format it whatever way is easiest for you.
TEST 'lua return'-commands after CHDK-start/reboot
It looks like the luar-problem from CHDK-rev.1032 to 1033. My fast solution at that time 'return(...)' in ptpcam.exe. But I know that is not the real cause. Is it back again? Lua initialisation fails?
<conn> reboot
Could not find any device matching given bus/dev numbers, retrying in 1 s...
<conn> lua return usb_msg_table_to_string(get_buildinfo())
<conn> getm
runtime error: :1: attempt to call global 'usb_msg_table_to_string' (a nil value)
Strange, I don't see this on d10 in my build.
To witch time is ptp-handler destroyed. I'm looking for a solution to switch the powersavemode for ptp-duration to 'always'.
If you mean stop the camera from going to sleep when PTP is connected, I want this too