Hello, I made a few modifications to the v3.3 KAP_UAV script (for CHDK v1.3). My focus was to adapt the script to flying a fixed wing with pixhawk autopilot and a cheap hobbyking relay adapter (using the scripts "PWM" mode).Changelog vs stock 3.3:- Added an option to use the external USB timer when reading USB pulse widths ("set_remote_timing" command)- Added an option to stop the script after X minutes (useful to ensure the lens will retract if I cannot signal the script to stop)- Added a buffer to the log routine, in order to prevent write delays on slow SD cards. The Log is written every 0.1 second- Removed a limitation that prevented the camera to power off when setting "Total Shots" param to 0 (infinite shots)- Customized the pwm_mode to suit my needs: a short pulse signals "shoot", and a longer pulse signals "stop script" (mission end)- Added logging in a few places, the most interesting place is in the "pwm_mode(pulse_width)" function, it now logs the measured pulse width (useful for debugging purposes when using a cheap relay with poor timing control)
:133 attempt to index global 'log' (a nil value)
I have logging enabled for the script (screen and SD card), I don't know much about the 'logging' process though - I can see a 'LOG' folder in the CHDK folder but it is empty (perhaps it's trying to write to a file that doesn't exist?)
Thanks for the reply, the output in the KAP.log file is below:
I'm using it on a S100 camera for photomapping purposes , in order to geotag the pictures I need to do a correlation between the hour/minute/second when the picture was done and the hour/minute/second when my autopilot recorded the corresponding coordinates.
My autopilot records 4 time per second the coordinates (longitude,latitude,altitude) , so for 1 picture I have 4 possible locations. To be easier to geotagg the image with the right values is possible to have also on KAP.log file the second divided to 4 or 2 timeframes ? So to have HH/MM/SS/xx where xx represent 00 / 25 /50 /75 th of a second ?
Also , to better understand , the hour recorded in the log is the hour when:- the picture is recorded on the memory card;- camera start to focus to take the picture;-the script gives the "command" to the camera to take the picture ?
Started by Jim
Completed and Working Scripts
Started by nadavofi
« 1 2 »
Started by Benny_H88
« 1 2 3 »
Started by davefolts
Creative Uses of CHDK
Started by GlobalSurvey
General Help and Assistance on using CHDK stable releases