def update_state
      Thread.new do
        Dictionary.commands.each do |zone, commands|
          Dictionary.commands[zone].each do |command, info|
            info[:values].each do |value, _|
              if value == 'QSTN'
                send(Parser.parse(command + "QSTN"))
                # If we send any faster we risk making the stereo drop replies. 
                # A dropped reply is not necessarily indicative of the
                # receiver's failure to receive the command and change state
                # accordingly. In this case, we're only making queries, so we do
                # want to capture every reply.
                sleep DEFAULT_TIMEOUT
              end
            end
          end
        end
      end
    end
def update_state
      Thread.new do
        Dictionary.commands.each do |zone, commands|
          Dictionary.commands[zone].each do |command, info|
            info[:values].each do |value, _|
              if value == 'QSTN'
                send(Parser.parse(command + "QSTN"))
                # If we send any faster we risk making the stereo drop replies. 
                # A dropped reply is not necessarily indicative of the
                # receiver's failure to receive the command and change state
                # accordingly. In this case, we're only making queries, so we do
                # want to capture every reply.
                sleep DEFAULT_TIMEOUT
              end
            end
          end
        end
      end
    end
def update_state Thread . new do Dictionary . commands . each do | zone , commands | Dictionary . commands [ zone ] . each do | command , info | info [ :values ] . each do | value , _ | if value == 'QSTN' send ( Parser . parse ( command + "QSTN" ) ) # If we send any faster we risk making the stereo drop replies.  # A dropped reply is not necessarily indicative of the # receiver's failure to receive the command and change state # accordingly. In this case, we're only making queries, so we do # want to capture every reply. sleep DEFAULT_TIMEOUT end end end end end end
Runs every command that supports the 'QSTN' value. This is a good way to
 get the sate of the receiver after connecting.
Runs every command that supports the QSTN value . This is a good way to get the sate of the receiver after connecting .