--[[@title FlashAir Remote]]repeat f=loadfile('A/CHDK/SCRIPTS/SLAVE.LUA') if not f then print("loadfile failed.") else f() end sleep(1000)until(false)
--[[@title Remote Commands]]shoot()-----------------------------------------------------------
#!/bin/bash## FlashAir upload script#if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then echo -e "\flashair-s95 - Upload files to FlashAir card\n\n Usage: flashair <FAIP> <UPDIR> <FILE>\n\n" exitfiif [ ! -f $3 ]; then echo "Unable to locate $PWD/$3. Aborting!!!" exitfiecho "Changing upload path to $2"curl http://$1/upload.cgi?UPDIR=$2sleep 1echo -e "\nUploading file $PWD/$3 to $1 ($2)..."#curl -F file=@$3 -F submit=submit http://$1/upload.cgicurl -F file=@$3 http://$1/upload.cgiecho -e "\nDone."
./flashair-s95 <FlashAirIP> /CHDK/SCRIPTS slave.lua
Looking at the code, it seems like FLASHAIR.LUA calls SLAVE.LUA repeatedly once a second? This might be okay for continuous shooting but there might need to be a mechanism to only call it once each time it's loaded? Not quite sure how to make that work - probably need some scheme to pass parameters between the main function and the called function? Either that or maybe have the main function delete SLAVE.LUA after it's called it once ?
When I used the web browser to generate a file on the SD card I could see the file with the browser. But the CHDK script didn't detect that until next run.
How exactly are you trying to use the file you upload in the script?
If you upload a new file, can you see it in the CHDK file browser?
I merged this back into the original topic. Having the discussion scattered over multiple thread just makes it harder for everyone to follow, it won't get you a better answer. The people who might be able to help you will see it no matter which sub-forum you post in.
I asked beforeQuoteIf you upload a new file, can you see it in the CHDK file browser?If it shows in the CHDK file browser (not a web browser) then there is probably something wrong with the way you've tried to do it in script. If not, then the canon firmware just isn't seeing your changes, or you are not actually creating the files in a place where the firmware could see them.
Started by joselandrada Creative Uses of CHDK
Started by lapser Creative Uses of CHDK
Started by Nikon Feature Requests
Started by mcduff85 General Discussion and Assistance
Started by reyalp Creative Uses of CHDK