--[[Quick and dirty two decimal place voice announcement for Cel- or other telemetry cell voltages that are reported at 0.01V resolution Put the script in SD/SCRIPTS/FUNCTIONS folder. Specify the input channel name and logical or physical switch that triggers script below. Then set up a SF to play this script when mySwitch is activated.]] myVoltage="Cel-" mySwitch="ls22" local delay_val=500 --minimum time between announcements (x10ms) local wake_time=0 local Cell, val1, val2 local function parse_cell(Cell) val1=math.floor(Cell*10) val2=Cell*100%10 end local function announce(voltage) Cell=getValue(getFieldInfo(voltage).id) parse_cell(Cell) playNumber(val1,0,PREC1) playNumber(val2,1) wake_time=getTime()+delay_val end local function run(event) if getValue(mySwitch)==1024 then if getTime()