Status Check - a quick check of important camera & SD card info - Completed and Working Scripts - CHDK Forum

Status Check - a quick check of important camera & SD card info

  • 1 Replies
  • 6358 Views
*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Status Check - a quick check of important camera & SD card info
« on: 29 / January / 2011, 17:33:57 »
Advertisements
Like many photographers, I tend to use my camera for a lot of differnt scenarios. As a result, it was cumbersome to always have to check the settings to make sure I was ready for the next event. Usually I was in a rush and sometimes wondered if I got everything set back to my "normal" setup.

This script simply reports the current status of most of the "To Do" items on my list before taking the next set of pictures. It's a simple script that has helped me avoid the most common mistakes.

Basically there are two screens of information that will be displayed. After the first screen is displayed the script waits for you to press the "set" button then it displays the final page.

There is only one parameter - to save the info in a log rather than display on the screen. The log is named using the hour and minute of the day as the file name (for a log saved at 12:4:33, the name would be LOG_1204.TXT). Here is a sample of the logged data in file "LOG_1711.TXT":

--------------------------
Date: 29/1/2011
Time: 17:11:58
 
Av: F2.7
Tv: 1/5
ISO: 50 or 80
IS: Continuous
Display: Do Not Show
IMG Size: Large
IMG Qual: 640x480
Disk Size(MB): 3887
Free Space(MB):3569
--------------------------

Place "Status.bas" in CHDK/Scripts folder.

Code: [Select]
rem Author SkyWalker9
@title Status Check
@param h Save log (0=No)
@default h 0

if h<>1 then goto "skip_log"
z=get_time 0
y=get_time 1
x=get_time 2
m=get_time 3
n=get_time 4
p=get_time 5
g=x*100+y
if g<1 then g=1
if g>9999 then g=9999
print_screen g
print "Date: "m"/"n"/"p
print "Time: "x":"y":"z
print " "

:skip_log
  if h=0 then cls
  gosub "first_set"
  if h=0 then gosub "wait_loop"
  gosub "second_set"
  goto "finished"

:first_set
  x=get_user_av_id
  select x
    case 9; print "Av: F2.8"
    case 10; print "Av: F3.2"
    case 11; print "Av: F3.5"
    case 12; print "Av: F4.0"
    case 13; print "Av: F4.5"
    case 14; print "Av: F5.0"
    case 15; print "Av: F5.6"
    case 16; print "Av: F6.3"
    case 17; print "Av: F7.1"
    case 18; print "Av: F8.0"
  end_select

  x=get_user_tv_id
  select x
    case -12; print "Tv: 15s"
    case -11; print "Tv: 13s"
    case -10; print "Tv: 10s"
    case -9; print "Tv: 8s"
    case -8; print "Tv: 6s"
    case -7; print "Tv: 5s"
    case -6; print "Tv: 4s"
    case -5; print "Tv: 3.2s"
    case -4; print "Tv: 2.5s"
    case -3; print "Tv: 2s"
    case -2; print "Tv: 1.6s"
    case -1; print "Tv: 1.3s"
    case 0; print "Tv: 1s"
    case 1; print "Tv: 0.8s "
    case 2; print "Tv: 0.6s"
    case 3; print "Tv: 0.5s"
    case 4; print "Tv: 0.4s"
    case 5; print "Tv: 0.3s"
    case 6; print "Tv: 1/4"
    case 7; print "Tv: 1/5"
    case 8; print "Tv: 1/6"
    case 9; print "Tv: 1/8"
    case 10; print "Tv: 1/10"
    case 11; print "Tv: 1/13"
    case 12; print "Tv: 1/15"
    case 13; print "Tv: 1/20"
    case 14; print "Tv: 1/25"
    case 15; print "Tv: 1/30"
    case 16; print "Tv: 1/40"
    case 17; print "Tv: 1/50"
    case 18; print "Tv: 1/60"
    case 19; print "Tv: 1/80"
    case 20; print "Tv: 1/100"
    case 21; print "Tv: 1/125"
    case 22; print "Tv: 1/160"
    case 23; print "Tv: 1/200"
    case 24; print "Tv: 1/250"
    case 25; print "Tv: 1/320"
    case 26; print "Tv: 1/400"
    case 27; print "Tv: 1/500"
    case 28; print "Tv: 1/640"
    case 29; print "Tv: 1/800"
    case 30; print "Tv: 1/1000"
    case 31; print "Tv: 1/1250"
    case 32; print "Tv: 1/1600"
    case 33; print "Tv: 1/2000"
    case 34; print "Tv: 1/2500"
    case 35; print "Tv: 1/3200"
  end_select

  x=get_iso
  select x
    case 0; print "ISO: AutoISO"
    case 1; print "ISO: 50 or 80"
    case 2; print "ISO: 100"
    case 3; print "ISO: 200"
    case 4; print "ISO: 400"
    case 5; print "ISO: 800"
    case -1; print "ISO: HiISO"
  end_select

  x=get_IS_mode
  select x
    case 0; print "IS: Continuous"
    case 1; print "IS: Shoot Only"
    case 2; print "IS: Panning"
    case 3; print "IS: OFF"
  end_select
  x=get_display_mode
  select x
    case 0; print "Display: Show Icons"
    case 1; print "Display: Do Not Show"
    case 2; print "Display: LCD off"
    case 3; print "Display: EVF"
  end_select
return

:second_set
  x=get_resolution
  select x
    case 0; print "IMG Size: Large"
    case 1; print "IMG Size: Medium 1"
    case 2; print "IMG Size: Medium 2"
    case 4; print "IMG Size: Send"
    case 8; print "IMG Size: Wide"
  end_select

  x=get_quality
  select x
    case 0; print "IMG Qual: 1280x720"
    case 1; print "IMG Qual: 640x480"
    case 2; print "IMG Qual: 320x240"
  end_select

  x=get_disk_size
  x=x/1000
  print "Disk Size(MB): "x

  x=get_free_disk_space
  x=x/1000
  print "Free Space(MB):"x
return

:wait_loop
     wait_click 10000
     is_key k "set"
     if k=1 then goto "exit_loop"
   goto "wait_loop"
:exit_loop
 cls
return

:finished
 if h=1 then print_screen 0
end

Update 4-19-11: When using the wait_click statements, some cameras require the timeout be specified; recommend starting with "wait_click 10000" (10secs). The script has been updated to reflect the change.
« Last Edit: 19 / April / 2011, 17:55:06 by SkyWalker9 »

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: Status Check - a quick check of important camera & SD card info
« Reply #1 on: 29 / January / 2011, 23:31:42 »
I'm including an updated script that uses additional PropCas statements designed for the SX20. The PropCas values didn't seem to be documented for the SX20 yet, so this update took me a while to test and verify.

The log info now has the following:

Code: [Select]
Date: 29/1/2011
Time: 23:22:42
 
Av: F2.7
Tv: 1/5
ISO: 50 or 80
IS: Continuous
Pic Size: Large
IMG Qual: 640x480
Disk Size(MB): 3887
Free Space(MB):3569
Exp Comp: 0
Flash Exp Comp: -96
WhiteBal: Auto
Mode Dial: Av
Meter: Evaluative
Display: Do Not Show


The updated script...

Code: [Select]
rem Author SkyWalker9
@title Status Check
@param h Save log (0=No)
@default h 0

if h<>1 then goto "skip_log"
z=get_time 0
y=get_time 1
x=get_time 2
m=get_time 3
n=get_time 4
p=get_time 5
g=x*100+y
if g<1 then g=1
if g>9999 then g=9999
print_screen g
print "Date: "m"/"n"/"p
print "Time: "x":"y":"z
print " "

:skip_log
  if h=0 then cls
  gosub "first_set"
  if h=0 then gosub "wait_loop"
  gosub "second_set"
  if h=0 then gosub "wait_loop"
  gosub "third_set"
  if h=0 then gosub "wait_loop"
  goto "finished"

:first_set
  x=get_user_av_id
  if x=9 then print "Av: F2.8"
  if x=10 then print "Av: F3.2"
  if x=11 then print "Av: F3.5"
  if x=12 then print "Av: F4.0"
  if x=13 then print "Av: F4.5"
  if x=14 then print "Av: F5.0"
  if x=15 then print "Av: F5.6"
  if x=16 then print "Av: F6.3"
  if x=17 then print "Av: F7.1"
  if x=18 then print "Av: F8.0"
  x=get_user_tv_id
  if x=-12 then print "Tv: 15s"
  if x=-11 then print "Tv: 13s"
  if x=-10 then print "Tv: 10s"
  if x=-9 then print "Tv: 8s"
  if x=-8 then print "Tv: 6s"
  if x=-7 then print "Tv: 5s"
  if x=-6 then print "Tv: 4s"
  if x=-5 then print "Tv: 3.2s"
  if x=-4 then print "Tv: 2.5s"
  if x=-3 then print "Tv: 2s"
  if x=-2 then print "Tv: 1.6s"
  if x=-1 then print "Tv: 1.3s"
  if x=0 then print "Tv: 1s"
  if x=1 then print "Tv: 0.8s "
  if x=2 then print "Tv: 0.6s"
  if x=3 then print "Tv: 0.5s"
  if x=4 then print "Tv: 0.4s"
  if x=5 then print "Tv: 0.3s"
  if x=6 then print "Tv: 1/4"
  if x=7 then print "Tv: 1/5"
  if x=8 then print "Tv: 1/6"
  if x=9 then print "Tv: 1/8"
  if x=10 then print "Tv: 1/10"
  if x=11 then print "Tv: 1/13"
  if x=12 then print "Tv: 1/15"
  if x=13 then print "Tv: 1/20"
  if x=14 then print "Tv: 1/25"
  if x=15 then print "Tv: 1/30"
  if x=16 then print "Tv: 1/40"
  if x=17 then print "Tv: 1/50"
  if x=18 then print "Tv: 1/60"
  if x=19 then print "Tv: 1/80"
  if x=20 then print "Tv: 1/100"
  if x=21 then print "Tv: 1/125"
  if x=22 then print "Tv: 1/160"
  if x=23 then print "Tv: 1/200"
  if x=24 then print "Tv: 1/250"
  if x=25 then print "Tv: 1/320"
  if x=26 then print "Tv: 1/400"
  if x=27 then print "Tv: 1/500"
  if x=28 then print "Tv: 1/640"
  if x=29 then print "Tv: 1/800"
  if x=30 then print "Tv: 1/1000"
  if x=31 then print "Tv: 1/1250"
  if x=32 then print "Tv: 1/1600"
  if x=33 then print "Tv: 1/2000"
  if x=34 then print "Tv: 1/2500"
  if x=35 then print "Tv: 1/3200"
  x=get_iso
  if x=0 then print "ISO: AutoISO"
  if x=1 then print "ISO: 50(80)"
  if x=2 then print "ISO: 100"
  if x=3 then print "ISO: 200"
  if x=4 then print "ISO: 400"
  if x=5 then print "ISO: 800"
  if x=6 then print "ISO: 1600"
  if x=7 then print "ISO: 3200"
  if x=-1 then print "ISO: HiISO"
  x=get_IS_mode
  if x=0 then print "IS Mode: Continuous"
  if x=1 then print "IS Mode: Shoot Only"
  if x=2 then print "IS Mode: Panning"
  if x=3 then print "IS Mode: OFF"
  b=get_resolution
  if b=0 then print "Resolution: Large"
  if b=1 then print "Resolution: Medium 1"
  if b=2 then print "Resolution: Medium 2"
  if b=3 then print "Resolution: Medium 3"
  if b=4 then print "Resolution: Small"
  if b=8 then print "Resolution: Wide"
  return

:second_set
  get_prop 169 x
  if x=1 then print "Video Quality: 320x240"
  if x=2 then print "Video Quality: 640x480"
  if x=4 then print "Video Quality: 1280x720"
  x=get_disk_size
  x=x/1000
  print "Disk Size(MB): "x
  x=get_free_disk_space
  x=x/1000
  print "Free Space(MB): "x
  get_prop 209 b
  print "Exp Comp: "b
  get_prop 127 b
  print "Flash Exp Comp: "b
return

:third_set
  get_prop 270 b
  if b=0 then print "WB: Auto"
  if b=1 then print "WB: Daylight"
  if b=2 then print "WB: Cloudy"
  if b=3 then print "WB: Tungsten"
  if b=4 then print "WB: Fluorescent"
  if b=5 then print "WB: Fluorescent H"
  if b=6 then print "WB: Flash"
  if b=7 then print "WB: Custom"
  get_prop 50 b
  if b=8228 then print "Mode Dial: Custom"
  if b=-32767 then print "Mode Dial: Manual"
  if b=-32766 then print "Mode Dial: Av"
  if b=-32765 then print "Mode Dial: Tv"
  if b=-32764 then print "Mode Dial: Program"
  if b=-32768 then print "Mode Dial: Auto"
  if b=-32755 then print "Mode Dial: Portrait"
  if b=-32756 then print "Mode Dial: Landscape"
  if b=-32757 then print "Mode Dial: Night Snapshot"
  if b=-32249 then print "Mode Dial: Sports"    
  if b=16402 then print "Mode Dial: Sunset"  
  if b=-32246 then print "Mode Dial: Stitch Assist"    
  if b=2600 then print "Mode Dial: Movie"
  get_prop 155 b
  if b=0 then print "Meter: Evaluative"
  if b=1 then print "Meter: Spot"
  if b=2 then print "Meter: Center Wgt"
  get_prop 66 b
  if b=0 then print "Date Stamp: OFF"
  if b=1 then print "Date Stamp: Date"
  if b=2 then print "Date Stamp: Date & Time"
  get_prop 281 b
  if b=0 then print "Safety MF: OFF"
  if b=1 then print "Safety MF: ON"

return

:wait_loop
     wait_click 10000
     is_key k "set"
     if k=1 then goto "exit_loop"
   goto "wait_loop"
:exit_loop
 cls
return

:finished
 if h=1 then print_screen 0
end

Update 4-19-11: When using the wait_click statements, some cameras require the timeout be specified; recommend starting with "wait_click 10000" (10secs). The script has been updated to reflect the change.
« Last Edit: 19 / April / 2011, 17:56:08 by SkyWalker9 »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal