@title CR-CHDK - Modifs for Nicoger - rev1
rem inspired by VP-Systems (rev 15-04-2012)
rem 31-10-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
n=1
m=get_zoom_steps()
if m>10 then n=m/10
z=get_zoom()
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
print c
if c>67 then gosub "pwroff"
if c>58 then gosub "stop_video"
if c>53 then gosub "tvdn"
if c>48 then gosub "tvup"
if c>40 then gosub "avdn"
if c>35 then gosub "avup"
if c>28 then gosub "rec_video"
if c>21 then gosub "zout"
if c>13 then gosub "zin"
if c>8 then gosub "focusoff"
if c>5 then gosub "focus"
if c>0 then gosub "shoot"
wend
end
:shoot
c=0
print "shoot"
shoot
sleep 1500
return
:rec_video
c=0
print "rec_video (unused)"
return
:stop_video
c=0
print "stop_video (unused)"
return
:focus
c=0
print "focus (unused)"
return
:focusoff
c=0
print "release (unused)"
return
:zin
c=0
z=z+n
if z>m then z=m
set_zoom z
print"zoomin (z=";z;")"
sleep 1000
return
:zout
c=0
z=z-n
if z<0 then z=0
set_zoom z
print "zoomout (z=";z;")"
sleep 1000
return
:avup
c=0
print ":Av+= (unused)"
return
:avdn
c=0
print "Av-= (unused)"
return
:tvup
c=0
print "Tv+ (unused)"
return
:tvdn
c=0
print "Tv-= (unused)"
return
:pwroff
c=0
print "poweroff(unused)"
return
nicoger a écrit:je ne peux plus prendre de photos ...
avant j'appuyais sur la touche 7
mais la rien
nicoger a écrit:et les autres touches non plus malheureusement
aurais tu une idée ?
Deltakap a écrit:nicoger a écrit:je ne peux plus prendre de photos ...
avant j'appuyais sur la touche 7
mais la rien
Normalement quand tu appuies sur cette touche 7, tu dois avoir un nombre qui s'affiche en bas de l'écran de l'apn suivi éventuellement d'un message genre "shoot", "rec_video", etc...
Peux-tu me donner ce numéro ?nicoger a écrit:et les autres touches non plus malheureusement
aurais tu une idée ?
Là oui, j'ai tout viré sauf le déclenchement et le zoom, donc c'est normal
Peux-tu d'ailleurs me donner tous les numéros affichés sur l'apn pour chaque touche de la télécommande ?
nicoger a écrit:sur mon retour vidéo, les bords sont un peu rognés et je ne vois qu'une partie des chiffres
Deltakap a écrit:nicoger a écrit:sur mon retour vidéo, les bords sont un peu rognés et je ne vois qu'une partie des chiffres
En ajoutant "set_backlight(1)" dans les premières lignes du script, tu devrais avoir l'affichage de l'apn allumé
nicoger a écrit:ben malheureusement ça n affiche rien a l écran
et comme mon cordon USB gère la vidéo aussi
dès que je branche je perd l'écran de l APN ...
c est bien set_backlight 1 qu il faut mettre ?
nicoger a écrit:ça peut t aider ?
@title CR-CHDK - Modifs for Nicoger - rev1
rem inspired by VP-Systems (rev 15-04-2012)
rem 31-10-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
n=1
m=get_zoom_steps()
if m>10 then n=m/10
z=get_zoom()
set_backlight 1
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
rem print c
if c>67 then gosub "action12"
if c>58 then gosub "action11"
if c>53 then gosub "action10"
if c>48 then gosub "action9"
if c>40 then gosub "action8"
if c>35 then gosub "action7"
if c>28 then gosub "action6"
if c>21 then gosub "action5"
if c>13 then gosub "action4"
if c>8 then gosub "action3"
if c>5 then gosub "action2"
if c>0 then gosub "action1"
wend
end
:action1
c=0
print "action 1"
gosub "unused"
return
:action2
c=0
print "action 2"
gosub "unused"
return
:action3
c=0
print "action 3"
gosub "unused"
return
:action4
c=0
print "action 4"
gosub "unused"
return
:action5
c=0
print "action 5"
gosub "unused"
return
:action6
c=0
print "action 6"
gosub "unused"
return
:action7
c=0
print "action 7"
gosub "unused"
return
:action8
c=0
print "action 8"
gosub "unused"
return
:action9
c=0
print "action 9"
gosub "unused"
return
:action10
c=0
print "action 10"
gosub "unused"
return
:action11
c=0
print "action 11"
gosub "unused"
return
:action12
c=0
print "action 12"
gosub "unused"
return
:unused
rem print "unused button"
return
while 1
do
c = get_usb_power
until c>0
print ">>>>>>> ";c
sleep 200
wend
end
Deltakap a écrit:C'est bizarre qu'on n'ait pas quelque chose de plus "propre" au niveau des résultats.
Je vais encore t'embêter avec une autre étape intermédiaire:
Ce code va juste afficher une valeur.
Sur le même principe que tout à l'heure, peux-tu me donner les valeurs pour chaque bouton ? (sauf 2,4,5,6 )
- Code: Tout sélectionner
while 1
do
c = get_usb_power
until c>0
print ">>>>>>> ";c
sleep 200
wend
end
@title CR-CHDK - Modifs for Nicoger - rev1
rem inspired by VP-Systems (rev 15-04-2012)
rem 31-10-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
n=1
m=get_zoom_steps()
if m>10 then n=m/10
z=get_zoom()
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
rem print c
if c>67 then gosub "action12"
if c>58 then gosub "action11"
if c>53 then gosub "action10"
if c>48 then gosub "action9"
if c>40 then gosub "action8"
if c>35 then gosub "action7"
if c>28 then gosub "action6"
if c>21 then gosub "action5"
if c>13 then gosub "action4"
if c>8 then gosub "action3"
if c>5 then gosub "action2"
if c>0 then gosub "action1"
wend
end
:action1
c=0
print "action 1"
gosub "error"
return
:action2
c=0
print "action 2"
gosub "error"
return
:action3
c=0
print "action 3"
gosub "error"
return
:action4
rem button1
c=0
gosub "zin"
return
:action5
rem button3
c=0
gosub "zout"
return
:action6
rem button8
c=0
print "action 6 / button 8"
gosub "unused"
return
:action7
rem button7 & button11
c=0
gosub "shoot"
return
:action8
rem button10
c=0
print "action 8 / button 10"
gosub "unused"
return
:action9
c=0
print "action 9"
gosub "error"
return
:action10
c=0
print "action 10"
gosub "error"
return
:action11
rem button8
c=0
print "action 11 / button 8"
gosub "unused"
return
:action12
c=0
print "action 12"
gosub "unused"
return
:shoot
print "shoot"
shoot
sleep 1500
return
:zin
z=z+n
if z>m then z=m
set_zoom z
print"zoom in (z=";z;")"
sleep 1000
return
:zout
z=z-n
if z<0 then z=0
set_zoom z
print "zoom out (z=";z;")"
sleep 1000
return
:error
print "error !"
return
:unused
print "unused button"
return
:error
print "error !"
sleep 500
return
:unused
print "unused button"
sleep 500
return
@title CR-CHDK - Modifs for Nicoger - rev1
rem inspired by VP-Systems (rev 15-04-2012)
rem 31-10-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
n=1
m=get_zoom_steps()
if m>10 then n=m/10
z=get_zoom()
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
rem print c
if c>67 then gosub "action12"
if c>58 then gosub "action11"
if c>53 then gosub "action10"
if c>48 then gosub "action9"
if c>40 then gosub "action8"
if c>35 then gosub "action7"
if c>28 then gosub "action6"
if c>21 then gosub "action5"
if c>13 then gosub "action4"
if c>8 then gosub "action3"
if c>5 then gosub "action2"
if c>0 then gosub "action1"
wend
end
:action1
c=0
print "action 1"
gosub "error"
return
:action2
c=0
print "action 2"
gosub "error"
return
:action3
c=0
print "action 3"
gosub "error"
return
:action4
rem button1
c=0
gosub "zin"
return
:action5
rem button3
c=0
gosub "zout"
return
:action6
rem button8
c=0
print "action 6 / button 8"
gosub "unused"
return
:action7
rem button7 & button11
c=0
gosub "shoot"
return
:action8
rem button10
c=0
print "action 8 / button 10"
gosub "unused"
return
:action9
c=0
print "action 9"
gosub "error"
return
:action10
c=0
print "action 10"
gosub "error"
return
:action11
rem button8
c=0
print "action 11 / button 8"
gosub "unused"
return
:action12
c=0
print "action 12"
gosub "error"
return
:shoot
print "shoot"
shoot
sleep 1500
return
:zin
z=z+n
if z>m then z=m
set_zoom z
print"zoom in (z=";z;")"
sleep 1000
return
:zout
z=z-n
if z<0 then z=0
set_zoom z
print "zoom out (z=";z;")"
sleep 1000
return
:error
print "error !"
sleep 500
return
:unused
print "unused button"
sleep 500
return
@title CR-CHDK - Modifs for Nicoger - rev1
rem inspired by VP-Systems (rev 15-04-2012)
rem 31-10-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
n=1
m=get_zoom_steps()
if m>10 then n=m/10
z=get_zoom()
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
print ">>>>>>>>> ";c
if c>67 then gosub "action12"
if c>58 then gosub "action11"
if c>53 then gosub "action10"
if c>48 then gosub "action9"
if c>40 then gosub "action8"
if c>35 then gosub "action7"
if c>28 then gosub "action6"
if c>21 then gosub "action5"
if c>13 then gosub "action4"
if c>8 then gosub "action3"
if c>5 then gosub "action2"
if c>0 then gosub "action1"
wend
end
:action1
c=0
print "action 1"
gosub "error"
return
:action2
c=0
print "action 2"
gosub "error"
return
:action3
c=0
print "action 3"
gosub "error"
return
:action4
rem button1
c=0
gosub "zin"
return
:action5
rem button3
c=0
gosub "zout"
return
:action6
rem button8
c=0
print "action 6 / button 8"
gosub "unused"
return
:action7
rem button7 & button11
c=0
gosub "shoot"
return
:action8
rem button10
c=0
print "action 8 / button 10"
gosub "unused"
return
:action9
c=0
print "action 9"
gosub "error"
return
:action10
c=0
print "action 10"
gosub "error"
return
:action11
rem button8
c=0
print "action 11 / button 8"
gosub "unused"
return
:action12
c=0
print "action 12"
gosub "error"
return
:shoot
print "shoot"
shoot
sleep 1500
return
:zin
z=z+n
if z>m then z=m
set_zoom z
print"zoom in (z=";z;")"
sleep 1000
return
:zout
z=z-n
if z<0 then z=0
set_zoom z
print "zoom out (z=";z;")"
sleep 1000
return
:error
print "error !"
sleep 500
return
:unused
print "unused button"
sleep 500
return
@title CR-CHDK - Modifs for Nicoger - rev1
rem inspired by VP-Systems (rev 15-04-2012)
rem 31-10-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
n=1
m=get_zoom_steps()
if m>10 then n=m/10
z=get_zoom()
set_backlight 1
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
print ">>>>>>>> ";c
if c>58 then gosub "button8"
if c>40 then gosub "button10"
if c>35 then gosub "shoot"
if c>28 then gosub "button8"
if c>21 then gosub "zout"
if c>13 then gosub "zin"
wend
end
:button8
c=0
print "button 8"
return
:button10
c=0
print "button 10"
return
:shoot
c=0
print "shoot"
shoot
sleep 1500
return
:zin
c=0
z=z+n
if z>m then z=m
set_zoom z
print"zoom in (z=";z;")"
sleep 1000
return
:zout
c=0
z=z-n
if z<0 then z=0
set_zoom z
print "zoom out (z=";z;")"
sleep 1000
return
nicoger a écrit:j ai juste modifié les chiffres après if c> avec les chiffres que je t annoncais tout a l heure
@title CR-CHDK - Modifs for Nicoger - rev1
rem inspired by VP-Systems (rev 15-04-2012)
rem 31-10-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
n=1
m=get_zoom_steps()
if m>10 then n=m/10
z=get_zoom()
set_backlight 1
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
rem print c
if c>67 then gosub "action12"
if c>58 then gosub "action11"
if c>53 then gosub "action10"
if c>48 then gosub "action9"
if c>40 then gosub "action8"
if c>35 then gosub "action7"
if c>28 then gosub "action6"
if c>21 then gosub "action5"
if c>13 then gosub "action4"
if c>8 then gosub "action3"
if c>5 then gosub "action2"
if c>0 then gosub "action1"
wend
end
:action1
c=0
print "action 1"
gosub "unused"
return
:action2
c=0
print "action 2"
gosub "unused"
return
:action3
c=0
print "action 3"
gosub "unused"
return
:action4
c=0
print "action 4"
gosub "unused"
return
:action5
c=0
print "action 5"
gosub "unused"
return
:action6
c=0
print "action 6"
gosub "unused"
return
:action7
c=0
print "action 7"
gosub "unused"
return
:action8
c=0
print "action 8"
gosub "unused"
return
:action9
c=0
print "action 9"
gosub "unused"
return
:action10
c=0
print "action 10"
gosub "unused"
return
:action11
c=0
print "action 11"
gosub "unused"
return
:action12
c=0
print "action 12"
gosub "unused"
return
:unused
rem print "unused button"
return
nicoger a écrit:et bingo en mode + (qui sert a quoi faudra que je demande à Linnar de VP systems)
nicoger a écrit:je garde donc l'avant dernier que tu as envoyé
nicoger a écrit:pour les autres touches focus c est le réglage avant de prendre la photo non ?
ça pourrait être utile ou pas ?
nicoger a écrit:donc je pourrais te la filer ou la copier sur le forum
pete a écrit:J'espere qu'après ils feront profiter à tout le monde de leurs connaissances.
@title CR-CHDK - CAM remote button mapping
rem inspired by VP-Systems (rev 15-04-2012)
rem 02-11-2012
rem CAMremote-1/2 (4-pin USB connector). Control Method: USB/CHDK
print "CR: USB/CHDK"
while 1
do
c = get_usb_power
until c>0
rem print ">>>>>> ";c
if c>74 then gosub "action13"
if c>67 then gosub "action12"
if c>58 then gosub "action11"
if c>53 then gosub "action10"
if c>48 then gosub "action9"
if c>40 then gosub "action8"
if c>35 then gosub "action7"
if c>28 then gosub "action6"
if c>21 then gosub "action5"
if c>13 then gosub "action4"
if c>8 then gosub "action3"
if c>5 then gosub "action2"
if c>0 then gosub "action1"
wend
end
:action1
c=0
print "action 1"
return
:action2
c=0
print "action 2"
return
:action3
c=0
print "action 3"
return
:action4
c=0
print "action 4"
return
:action5
c=0
print "action 5"
return
:action6
c=0
print "action 6"
return
:action7
c=0
print "action 7"
return
:action8
c=0
print "action 8"
return
:action9
c=0
print "action 9"
return
:action10
c=0
print "action 10"
return
:action11
c=0
print "action 11"
return
:action12
c=0
print "action 12"
return
:action13
c=0
print "action 13"
return
Retourner vers L'électronique embarquée et au sol
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 19 invités