FixedLensSX110.lua
1 --[[ 2 @title FixedLens_elph190_ixus180 3 @chdk_version 1.7 4 Rev 0.2 5 6 Copyright (c) 2025, Jose R Garcia (jg-fossh@protonmail.com). 7 All rights reserved. 8 9 | Meta | Data 10 | :-------- | :----------- 11 | _Project_ | 12 | _Version_ | 1.0 13 | _Author_ | Jose Garcia 14 | _License_ | GNU GPLv3 15 16 @chdk_version 1.7 17 @title FocalSteps 18 @description 19 This script displays an input text box that accepts one character to provide the 20 user the capability to select between 15 different focal lengths. 21 22 --]] 23 24 -- List that maps Options to Zoom Steps 25 local c_flopt_tbl = 26 { 27 ["A"] = 0, 28 ["B"] = 2, 29 ["C"] = 3, 30 ["D"] = 5, 31 ["E"] = 6, 32 ["F"] = 7, 33 ["G"] = 8, 34 ["H"] = 9, 35 ["I"] = 12, 36 ["J"] = 13, 37 ["K"] = 16, 38 ["L"] = 18, 39 ["M"] = 19, 40 ["N"] = 20, 41 ["O"] = 22, 42 } 43 44 -- List that maps Options to categories 45 local c_opcat_tbl = 46 { 47 ["A"] = "Street 35mm", 48 ["B"] = "EyeView 42mm", 49 ["C"] = "Nifty 50mm", 50 ["D"] = "Narrow 64mm", 51 ["E"] = "Portrait 70mm", 52 ["F"] = "Portrait 75mm", 53 ["G"] = "Portrait 85mm", 54 ["H"] = "Portrait 96mm", 55 ["I"] = "Sports 135mm", 56 ["J"] = "Sports 150mm", 57 ["K"] = "Sports 210mm", 58 ["L"] = "Sports 255mm", 59 ["M"] = "Sports 280mm", 60 ["N"] = "Wildlife 300mm", 61 ["O"] = "Wildlife 360mm", 62 } 63 64 -- Main Section 65 set_zoom_speed(70) 66 -- Display Options 67 print("Op | FL | Category") 68 print(" A | 36mm | Street35") 69 print(" B | 43mm | EyeView ") 70 print(" C | 50mm | Nifty50 ") 71 sleep(3600) 72 print(" D | 61mm | Narrow64 ") 73 print(" E | 69mm | Portrait70") 74 print(" F | 76mm | Portrait75") 75 print(" G | 86mm | Portrait85") 76 sleep(3600) 77 print(" H | 96mm | Portrait96") 78 print(" I | 134mm | Sports135") 79 print(" J | 151mm | Sports150") 80 print(" K | 209mm | Sports210") 81 sleep(3600) 82 print(" L | 255mm | Sports255") 83 print(" M | 279mm | Sports280") 84 print(" N | 300mm | Nature300") 85 print(" O | 360mm | Nature360") 86 sleep(3600) 87 88 -- Prompt User to make a selection 89 i_fl_op=textbox("Std. Focal Lens Eqv." , "Enter a letter" , "C" , 1) 90 -- Set zoom 91 set_zoom(c_flopt_tbl[i_fl_op]) 92 93 -- Display selected option 94 print("\n\n\nEqv. Focal Length:") 95 print(c_opcat_tbl[i_fl_op]) 96 print("\n") 97 sleep(1200) 98 99 -- Done. Exit Alt to allow normal usage 100 exit_alt()