Lua gibt Fehler ausgeführt "get_hyp_dist ()".

Welcome to all English speaking CHDK users

Lua gibt Fehler ausgeführt "get_hyp_dist ()".

Beitragvon laspache » 31.08.2010, 07:23

Gibt "calling globalen Nill Wert?". Ich denke, "get_hyp_dist ()" ist nicht korrekt kompiliert. chdk.wikia.com Version läuft "get_hyp_dist ()" ohne Fehler. Sorry für meine Sprache, die ich nicht Deutsch sprechen, ich bin mit Google übersetzen zu lesen und zu schreiben, in chdk-treff.de Forum.

Dank
Zuletzt geändert von laspache am 31.08.2010, 07:28, insgesamt 2-mal geändert.
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Beitragvon rudi » 31.08.2010, 09:20

Hallo laspache,

seit April 2010 wurde in CHDK-DE ein anderer DOF-Rechner integriert.

Die Funktionen get_near_limit, get_far_limit, get_dof, get_hyp_dist, get_focal_length wurden entfernt.

Die neue Funktion get_dofinfo() liefert dieses Datenfeld zurück.
    hyp_valid: hyperfokale Distanz ist gültig (wird durch Blende und Brennweite beeinflusst)
    focus_valid: Entfernungswerte sind gültig (wird durch Motiventfernung und hyperfokale Distanz beeinflusst)
    aperture: Blendenwert [x 1000]
    coc: kleinster Zerstreuungskreis [x 1000 mm]
    focal_length: Brennweite [x 1000 mm]
    eff_focal_length: äquivalente 35mm Brennweite [x 1000 mm]
    focus: Motiventfernung [mm]
    near: Nahpunktdistanz [mm]
    far: Fernpunktdistanz [mm]
    dof: Schärfentiefe [mm]
    hyp_dist: hyperfokale Distanz [mm]
    min_stack_dist: kleinste, sinnvolle Stack Entfernung [mm]

CHDK:
Syntax: [ Download ] [ Verstecken ]
Benutze Lua Syntax Highlighting
h = get_hyp_dist()
Erstellt in 0.005 Sekunden, mit GeSHi 1.0.8.9

CHDK-DE:
Syntax: [ Download ] [ Verstecken ]
Benutze Lua Syntax Highlighting
di = get_dofinfo()

h = di.hyp_dist
Erstellt in 0.005 Sekunden, mit GeSHi 1.0.8.9


Gruß rudi
Benutzeravatar
rudi
CHDK-Spezialist
CHDK-Spezialist
 
Beiträge: 510
Registriert: 11.09.2009, 11:27
Kamera(s): A590IS_101B, SX260_100B

Beitragvon msl » 31.08.2010, 11:42

Welcome laspache,

we can also speak a little bit english in our foreign corner.

There are differences between the German and the international version like rudi wrote. The German version has a new and better DOF calculator. You get a table with get_dofinfo(). This table contains all the DOF values.

cu msl
Benutzeravatar
msl
Super-Mod
Super-Mod
 
Beiträge: 4567
Bilder: 271
Registriert: 22.02.2008, 11:47
Wohnort: Leipzig
Kamera(s): A720 1.00c
SX220 1.01a

Thank you MSL & Rudi

Beitragvon laspache » 02.09.2010, 05:52

Appreciate your instant response.

I did visited the Foreign corner but there were no posting and since my curiosity was a script based, I posted it here. Kindly move this thread to Foreign corner if this is in the wrong place.

I was trying to make a LUA script for night and light painting photography which will

1) Focus to infinity
2) Read focus.
3) Calculate hyperfocal distance based on the read focus
4) Set the focus to hyperfocal distance
5) Set ISO, AV and TV
6) Set shoot delay for 3 or 5 sec and shoot

Once again thank you MSL & Rudi.

Rgds,
Laspache
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Re: Thank you MSL & Rudi

Beitragvon rudi » 02.09.2010, 06:51

Hello laspache,

laspache hat geschrieben:1) Focus to infinity
2) Read focus.
...

I think "2) Read focus" must be "infinity".

rudi
Benutzeravatar
rudi
CHDK-Spezialist
CHDK-Spezialist
 
Beiträge: 510
Registriert: 11.09.2009, 11:27
Kamera(s): A590IS_101B, SX260_100B

Need to set focus to infinity via script

Beitragvon laspache » 02.09.2010, 07:44

Hi Rudy,

Yes, you are right. 1 and 2 are the same. I need to set the focus to infinity. I tried using

x=65535
set_focus(x)

but the focus is not set to infinity. Is there a way to set the focus to infinity?

thanks a million.

Rgds,
Laspache
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Beitragvon rudi » 02.09.2010, 10:00

Hi Laspache,

try a smaller value eg. 65000.

rudi
Benutzeravatar
rudi
CHDK-Spezialist
CHDK-Spezialist
 
Beiträge: 510
Registriert: 11.09.2009, 11:27
Kamera(s): A590IS_101B, SX260_100B

Beitragvon laspache » 02.09.2010, 10:37

Hi Rudy,

I tried setting the focus to lower number but the focus wont set. When I set the focus to Manual and set it to Infinity. Running the following;

print("Focus set to:",get_focus())

Returns;

Focus set to: 65535

The details for my camera;

CHDK 1.1.0-DE Aug-23-2010
Camera:590

Thanks,
Laspache
FW:101b
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Beitragvon CHDKLover » 02.09.2010, 11:40

Hallo laspache,
please try to set the focus to Manual (e.g. in P-Mode or M-mode) and after this run the script, please.
The following script works fine on my a610.

CHDKLover
Dateianhänge
focus.lua
(95 Bytes) 648-mal heruntergeladen
A610 100e CHDK-DE: aktuelle Version
Benutzeravatar
CHDKLover
Super-Mod
Super-Mod
 
Beiträge: 878
Bilder: 8
Registriert: 12.09.2007, 18:25
Wohnort: Dresden
Kamera(s): a610 100e

Same result, focus not set :(

Beitragvon laspache » 02.09.2010, 12:08

Hi CHDKLover,

Thanks for your support. I have tested the script you sent on both M and P mode. Focus doesnt' set as expected. Here's a screenshot of the output.

Rgds,
Laspache

Bild
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Beitragvon CHDKLover » 02.09.2010, 12:33

Hi laspache,
I think you aren't in MF-Mode, because there is no MF-loupe on live view.

CHDKLover
A610 100e CHDK-DE: aktuelle Version
Benutzeravatar
CHDKLover
Super-Mod
Super-Mod
 
Beiträge: 878
Bilder: 8
Registriert: 12.09.2007, 18:25
Wohnort: Dresden
Kamera(s): a610 100e

Manual- Dial and Manual Focus

Beitragvon laspache » 02.09.2010, 12:35

Hi CHDKLover,

Sorry posted the wrong picture. This one is the right with with M-dial and manual focus mode.

Thanks,
Laspache

Bild
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Beitragvon CHDKLover » 02.09.2010, 12:43

Hi laspache,
please delete/rename the CHDK config file (<Drive>:\CHDK\CCHDK.CFG) and try again.

CHDKLover
A610 100e CHDK-DE: aktuelle Version
Benutzeravatar
CHDKLover
Super-Mod
Super-Mod
 
Beiträge: 878
Bilder: 8
Registriert: 12.09.2007, 18:25
Wohnort: Dresden
Kamera(s): a610 100e

No Luck:(

Beitragvon laspache » 02.09.2010, 12:51

Hi CHDKLover,

Renamed the config file, set the camera to M-dial and focus to manual.

No luck :( befor and after remains the same.

Laspache
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Running the script second time changes focus to 65535

Beitragvon laspache » 02.09.2010, 13:02

Hi CHDKLover,

I notice if i run the script the second time the BEFOR and AFTER changed to 65535. Let me modify the script to do a half press and sleep for 1 and release then check.

Thanks.
Laspache
laspache
CHDK-Einsteiger
CHDK-Einsteiger
 
Beiträge: 12
Registriert: 30.07.2010, 03:18

Nächste

Zurück zu International

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste