Hi All.Does anybody support https://github.com/acamilo/CHDK-PTP-Java ? It's Java client for CHDK PTP.
I see great function "remoteshoot"(shoot and download without saving to SD) in the https://www.assembla.com/code/chdkptp/ and would like to implement the same for CHDK-PTP-Java.As far as I understand, remoteshoot implemented in the rsint.lua. Could anybody please to point me into some doc that describes USB commands for remoteshoot ? Or describe a little bit how it works ? (400 lines lua code is a little bit complex for me yet).
See this post I wrote to someone else who asked about implementing remoteshoot http://chdk.setepontos.com/index.php?topic=11330.msg111397#msg111397 for some details.
Thank you very much. I hope to I will be able to reproduce it in java.
If I understand correctly, handlers just used for store chunks in files.
chdkptp desktop code requests camera in one thread. I.e. there is no any forks for read data from camera. Am I right ?
I reviewed chdkptp code for remote shooting and implemented about a half of own code for that. But... you spend many time for testing chdkptp and implemented so many options. Since I should have to use camera's part of chdkptp code, I tried to find way how to parse rlibs.lua from my software for send to camera.
It will be one more small framework only for my application that will not be useful for many people. If somebody will want to use and improve my java framework, we will have to always synchronize code with chdkptp.
Instead, I tried to implement more general solution. I found Lua interpreter for java - luaj. So, I need to reimplement only C part of chdkptp and will be able to use full power of chdkptp options.
You can see result of my 2 days hacking at https://github.com/alex73/chdkptp/tree/master/java/src. I'm not sure that I implemented Lua object model so good, but it works and can be improved.For support full chdkptp functionality, more methods should be implemented, but it's already good skeleton.
There is only one "fix" for lua code - connection should be prepared in java code because connect/disconnect in Lua code doesn't do anything. It's required for integrate framework into application and call Lua code many times for open connection. It can be fixed if need after binding to lua command will be prepared.
GPL is good license, and it will be better to improve one good framework instead create new one.reyalp, what do you think about just include my java code after some cleanup into chdkptp ?
QuoteInstead, I tried to implement more general solution. I found Lua interpreter for java - luaj. So, I need to reimplement only C part of chdkptp and will be able to use full power of chdkptp options.This is an interesting approach. A similar but slightly different approach is what jbaiter did for python with https://github.com/jbaiter/chdkptp.py - but in this case the C code is compiled as a DLL and loaded as a Lua module, rather than re-implementing the APIs. Building the C code as a module requires some minor changes (see diff above github), which I haven't yet put in the chdkptp trunk because there are issues making it cleanly cross platform. There can also be problems if chdkptp is linked against a different C runtime than the Lua interpreter.
QuoteThere is only one "fix" for lua code - connection should be prepared in java code because connect/disconnect in Lua code doesn't do anything. It's required for integrate framework into application and call Lua code many times for open connection. It can be fixed if need after binding to lua command will be prepared.I haven't really understood this.
If there are changes in the chdkptp C APIs or Lua code that can make your project work more simply without negative impact, than I am happy to consider including them.As far as including the java code: I'm not much of a java programmer, and I have enough trouble finding time to maintain chdkptp as it is. There's a lot of stuff I'd like to do that I haven't found time for, so I'd rather not have another host API to maintain.
Started by reyalp « 1 2 ... 110 111 » General Discussion and Assistance
Started by waterwingz General Discussion and Assistance
Started by dmitrys General Discussion and Assistance
Started by nod5 General Discussion and Assistance
Started by Caefix General Discussion and Assistance