Lua script - enhanced tv mode for all cams - page 2 - LUA Scripting - CHDK Forum  

Lua script - enhanced tv mode for all cams

  • 27 Replies
  • 17244 Views
*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Lua script - enhanced tv mode for all cams
« Reply #10 on: 28 / October / 2008, 07:15:07 »
Advertisements
A small change of the script.  :)

With the new version of CHDK (rev. 545) we can make the script a little bit safer (thanks to reyalp). The script check the record mode. If no record mode the script stop for switching to record mode.  After this you must click the <alt> mode key (print) to continue the script.

msl
« Last Edit: 28 / October / 2008, 07:27:19 by msl »
CHDK-DE:  CHDK-DE links

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Lua script - enhanced tv mode for all cams
« Reply #11 on: 30 / November / 2008, 17:02:58 »
hello! this sounds like a good idea.

so it will compensate the aperture for shutter speeds like 1/8000th of a second and slower ones and such?

will it use higher aperture values accessed with chdk?

i tried this on my A590IS using the latest autobuild (v0.8.7).

it loads fine, but when i try to change any of the settings the camera just crashes.

any help?
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Lua script - enhanced tv mode for all cams
« Reply #12 on: 30 / November / 2008, 17:42:04 »
I've tested the script with the newest update of chdk and it's working fine.

Did you try other lua scripts?

Your cam is new in the chdk family. Maybe is there still a problem with lua scripts.
CHDK-DE:  CHDK-DE links

*

Offline fe50

  • ******
  • 3132
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Lua script - enhanced tv mode for all cams
« Reply #13 on: 30 / November / 2008, 18:14:13 »
@Coutts:

To check whether the Lua functions (io, os & strings lib) work correct on your A590, you should run the LUA library test.


*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Lua script - enhanced tv mode for all cams
« Reply #14 on: 30 / November / 2008, 18:22:03 »
@Coutts:

To check whether the Lua functions (io, os & strings lib) work correct on your A590, you should run the LUA library test.
i ran this test (it was in the /test folder if this is right), it outputted:

*** STARTED ***
***end io OK***
***end os OK ***
**end string FAIL 1***
*** FINISHED ***


=/ so i can't run lua scripts then?
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

*

Offline reyalp

  • ******
  • 13391
Re: Lua script - enhanced tv mode for all cams
« Reply #15 on: 30 / November / 2008, 18:43:06 »
no, that means 1 test of the string library failed. If you can attach the llibtst.log to a post here, that would help identify the problem. If you can also tell us which canon firmware version your A590 has, that would also help.

Note that llibtst.lua only exercises the functions used by the libraries, not general shooting functions.
Don't forget what the H stands for.

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Lua script - enhanced tv mode for all cams
« Reply #16 on: 30 / November / 2008, 18:50:49 »
the intervalometer script on the wiki works, which is cool.

the metronome one doesn't, it crashes.

heres my libtst.lua file:

Code: [Select]
test log opened
platform: a590 101b
version: CHDK 0.8.7-607 built on Nov 30 2008 11:52:38
os: dryos platformid: 3176
***test io***
file info for io.input: closed file!
file info for io.output: valid file
 ptr: 2078560 fd: 3 len: 217 pos: 217
 raw vals: 0:3 4:217 8:1 12:217 16:1 20:1 24:270608392 28:0 32:1819029313
io.open("A/iotest0.txt","w+b"): OK PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("set",4): OK 4 PASS
A/iotest0.txt:read(5): string [slick]
A/iotest0.txt:seek("nil",nil): OK 9 PASS
A/iotest0.txt:seek("cur",-5): OK 4 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("end",nil): OK 44 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:flush(): OK PASS
A/iotest0.txt:seek("set",nil): OK 0 PASS
test file:lines()
0: [the quick brown fox jumps over the lazy dog]
1: [1]
2: [2a   3 1234567890       b]
A/iotest0.txt:seek("set",nil): OK 0 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("set",nil): OK 0 PASS
test file:read("*a")
A/iotest0.txt:read(*a): string [                                           
1
2a   3 1234567890       b]
A/iotest0.txt:seek("set",nil): OK 0 PASS
testing file:read("*n")
A/iotest0.txt:read(*n): number [1]
A/iotest0.txt:seek("nil",nil): OK 45 NA
A/iotest0.txt:read(*n): number [2]
A/iotest0.txt:seek("nil",nil): OK 47 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 47 NA
A/iotest0.txt:read(1): string [a]
A/iotest0.txt:seek("nil",nil): OK 48 NA
A/iotest0.txt:read(*n): number [3]
A/iotest0.txt:seek("nil",nil): OK 52 NA
A/iotest0.txt:read(*n): number [1234567890]
A/iotest0.txt:seek("nil",nil): OK 63 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 70 NA
A/iotest0.txt:read(1): string [b]
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:read(1): <no results>
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:close(): OK PASS
test open missing file
io.open("A/bogus","r"): ERR msg=A/bogus: error PASS
test open dir
io.open("A/CHDK","r"): ERR msg=A/CHDK: error PASS
io.open("A/iotest0.txt","r"): OK PASS
test invalid seeks
A/iotest0.txt:seek("set",-1): ERR nil PASS
A/iotest0.txt:seek("end",100): ERR nil PASS
A/iotest0.txt:close(): OK PASS
***end io OK***

***test os***
current date Sun Nov 30 18:49:51 2008
os.time(): OK 1228070991 PASS
os.time({day=1,year=1980,month=1,}): OK 315576000 PASS
os.time({day=1,year=1066,month=1,}): ERR PASS
%a [Sun]
%A [Sunday]
%b [Nov]
%B [November]
%c [Sun Nov 30 18:49:51 2008]
%d [30]
%H [18]
%I [06]
%j [335]
%m [11]
%M [49]
%p [PM]
%S [51]
%U [48]
%w [0]
%W [47]
%x [11/30/08]
%X [18:49:51]
%y [08]
%Y [2008]
%Z [%Z]
%% [%]
os.mkdir("A/MDTST0"): OK PASS
io.open("A/MDTST0/TEST0.DAT","wb"): OK PASS
A/MDTST0/TEST0.DAT:write(...): OK PASS
A/MDTST0/TEST0.DAT:close(): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=1228003200
 mtime=1228070990
 ctime=1228070990
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.utime("A/MDTST0/TEST0.DAT",nil,nil): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=1228003200
 mtime=1228070990
 ctime=1228070990
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.utime("A/MDTST0/TEST0.DAT",441806400,472824000): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=441763200
 mtime=472824000
 ctime=1228070990
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.stat("A/MDTST0"): OK PASS
{
 dev=2
 mode=16895
 size=32768
 atime=1228003200
 mtime=1228070990
 ctime=1228070990
 blksize=512
 blocks=64
 attrib=16
 is_dir=true
 is_file=false
}
os.rename("A/MDTST0/TEST0.DAT","A/MDTST0/TEST1.DAT): OK PASS
os.listdir("A/MDTST0",nil): OK PASS
{
 1="TEST1.DAT"
}
os.listdir("A/MDTST0",true): OK PASS
{
 1="."
 2=".."
 3="TEST1.DAT"
}
os.remove("A/MDTST0): ERR A/MDTST0: error PASS
os.remove("A/bogus): ERR A/bogus: error PASS
os.listdir("A/bogus",nil): ERR A/bogus: error PASS
os.listdir("A/llibtst.log",nil): OK NA
{
}
os.stat("A/bogus"): ERR A/bogus: error PASS
os.utime("A/bogus",nil,nil): ERR A/bogus: error PASS
os.rename("A/bogus","A/blah): ERR A/bogus: error PASS
os.mkdir("A/CHDK"): ERR A/CHDK: error PASS
os.remove("A/MDTST0/TEST1.DAT): OK PASS
os.remove("A/MDTST0): OK PASS
os.remove("A/iotest0.txt): OK NA
***end os OK***

***test string***
string.byte("test",2): OK 101 PASS
string.char(116,101,115,116): OK test PASS
dump/load: OK test123 PASS
string.find("test 1 2 3F!?","t%s(%d) 2 (%x%x%p%p)$"): ERR nil nil nil nil FAIL
string.format("%c %d %x %s",100,100,100,"test"): OK d 100 64 test PASS
string.len("\000test"): OK 5 PASS
string.lower("TESTtest"): OK testtest PASS
string.upper("TESTtest"): OK TESTTEST PASS
string.rep("test",2): OK testtest PASS
string.reverse("123"): OK 321 PASS
string.sub("test",-3): OK est PASS
***end string FAIL 1***

close test log

i'm using the morebest build (i think thats what its called), version 0.8.7 of the autobuild.
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

*

Offline reyalp

  • ******
  • 13391
Re: Lua script - enhanced tv mode for all cams
« Reply #17 on: 30 / November / 2008, 18:58:33 »
I was asking for the canon firmware version, as found using ver.req

The log says you are using firmware built for 1.01b

The test shows that pattern matching has failed for some reason. Everything else appears fine. If someone with a different dryos cam can check whether they also fail that test, it would be very helpful.
Don't forget what the H stands for.


*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Lua script - enhanced tv mode for all cams
« Reply #18 on: 30 / November / 2008, 19:05:11 »
ah yes, my camera uses v1.01b. sorry lol wasn't sure what you meant ha.
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

*

Offline fe50

  • ******
  • 3132
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Lua script - enhanced tv mode for all cams
« Reply #19 on: 30 / November / 2008, 20:14:21 »
...The test shows that pattern matching has failed for some reason. Everything else appears fine. If someone with a different dryos cam can check whether they also fail that test, it would be very helpful.
#608 on SD870 1.00C runs without errors.

 

Related Topics