def check_hw_switches(self, no_event=False):
        # check to make sure the 'hw_confirm_time' time has passed. If not then
        # we cannot trust any value we read from the switches
        if (self.config['coil_inc'].time_last_changed +
                (self.config['hw_confirm_time'] / 1000.0) <= time.time()):
            self.log.debug("Checking hw switches to determine reel value")
            value = -999
            for i in range(len(self.value_switches)):
                if self.value_switches[i]:  # not all values have a switch
                    if self.machine.switch_controller.is_active(
                            self.value_switches[i].name):
                        value = i

            self.log.debug("+++Setting hw value to: %s", value)
            self.physical_value = value
            self.hw_sync = True
            # only change this if we know where we are or can confirm that
            # we're not in the right position
            if value != -999:
                self.assumed_value = value

            # if value is -999, but we have a switch for the assumed value,
            # then we're in the wrong position because our hw_value should be
            # at the assumed value
            elif (self.assumed_value != -999 and
                      self.value_switches[self.assumed_value]):
                self.assumed_value = -999

            if not no_event:
                self.machine.events.post('reel_' + self.name + "_hw_value",
                                         value=value)
            return value

        else:
            return False
Checks all the value switches for this score reel.
dataset/ETHPy150Open missionpinball/mpf/mpf/devices/score_reel.py/ScoreReel.check_hw_switches