@staticmethod
    def pwm32_to_int(source_int):

        # generated by the int_to_pwm.py script in the mpf/tools folder

        lookup_table = {
                        0: 0,            # 00000000000000000000000000000000
                        1: 2,            # 00000000000000000000000000000010
                        2: 131074,       # 00000000000000100000000000000010
                        3: 4196354,      # 00000000010000000000100000000010
                        4: 33686018,     # 00000010000000100000001000000010
                        5: 68165762,     # 00000100000100000010000010000010
                        6: 138545218,    # 00001000010000100000100001000010
                        7: 277365794,    # 00010000100010000100010000100010
                        8: 572662306,    # 00100010001000100010001000100010
                        9: 574916882,    # 00100010010001001000100100010010
                        10: 613557394,   # 00100100100100100010010010010010
                        11: 1227133514,  # 01001001001001001001001001001010
                        12: 1246382666,  # 01001010010010100100101001001010
                        13: 1385473322,  # 01010010100101001010010100101010
                        14: 1420448938,  # 01010100101010100101010010101010
                        15: 1431612074,  # 01010101010101001010101010101010
                        16: 2863311530,  # 10101010101010101010101010101010
                        17: 2863355222,  # 10101010101010110101010101010110
                        18: 2874583894,  # 10101011010101101010101101010110
                        19: 2909493974,  # 10101101011010110101101011010110
                        20: 3065427638,  # 10110110101101101011011010110110
                        21: 3067833782,  # 10110110110110110110110110110110
                        22: 3681475438,  # 11011011011011101101101101101110
                        23: 3720050414,  # 11011101101110110111011011101110
                        24: 4008636142,  # 11101110111011101110111011101110
                        25: 4017601502,  # 11101111011101111011101111011110
                        26: 4156487614,  # 11110111101111101111011110111110
                        27: 4226801534,  # 11111011111011111101111101111110
                        28: 4278124286,  # 11111110111111101111111011111110
                        29: 4290770942,  # 11111111101111111111011111111110
                        30: 4294901758,  # 11111111111111101111111111111110
                        31: 4294967294,  # 11111111111111111111111111111110
                        32: 4294967295,  # 11111111111111111111111111111111
                        }

        if 0 <= source_int <= 32:
            return lookup_table[source_int]
        else:
            raise ValueError("%s is invalid pwm int value. (Expected value "
                             "0-32)" % (source_int))
dataset/ETHPy150Open missionpinball/mpf/mpf/system/utility_functions.py/Util.pwm32_to_int/original