Method: Odn#measure_guide_tune
- Defined in:
- lib/platform/stb/odn/odn.rb
#measure_guide_tune(from_channel, to_channel) ⇒ Object
Public: measures tuning in guide
from_channel - channel number we are starting from to_channel - channel number we are going to tune to
Returns nothing
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/platform/stb/odn/odn.rb', line 191 def measure_guide_tune(from_channel, to_channel) logger.info("Guide tune from channel #{from_channel} to #{to_channel}") screenROI = roi.image.guide_network_logo timeout=15 fail("Failed to launch guide") unless screens.guide.navigate? screens.guide.set_channel?(from_channel, :press_select => false) sleep(3.sec) filename = capture_screen("tmp_stb_#{$stb_id}.jpg") screenROI.ref_img = filename sleep(5.sec) logger.info("Initial screen", :screenshot => true, :use_last_image => false, :image_suffix => "image") screens.guide.set_channel?(to_channel, :press_select => false) times[0] = Time.now if screenROI.wait_until_not_displayed?(timeout=15000, :priority => :high) times[1] = Time.now else times[1] = times[0] # failed case end dataValue = time_diff_milli(times[0], times[1]) fail("Failed to go to channel #{to_channel}") if (dataValue == 0) report_result(:start_time => times[0], :stop_time => times[1]) logger.duration(dataValue, :message => "Time to channel #{to_channel}") end |