Ignore:
Timestamp:
03/24/19 08:15:59 (4 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Ran 2to3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/pyuipc_emu.py

    r298 r919  
    217217            results.append(int(vs / 60.0 * 0.3048 * 256))
    218218        elif offset==0x0560:  # Latitude
    219             results.append(long(latitude*10001750.0*65536.0*65536.0/90.0))
     219            results.append(int(latitude*10001750.0*65536.0*65536.0/90.0))
    220220        elif offset==0x0568:  # Longitude
    221             results.append(long(longitude*65536.9*65536.0*65536.0*65536.0/360.0))
     221            results.append(int(longitude*65536.9*65536.0*65536.0*65536.0/360.0))
    222222        elif offset==0x0570:  # Aircraft altitude in metres (fractional part)
    223             results.append(long( (altitude*0.3048*65536*65536)%(65536*65536)))
     223            results.append(int( (altitude*0.3048*65536*65536)%(65536*65536)))
    224224        elif offset==0x0574:  # Aircraft altitude in metres (whole part)
    225225            results.append(int(altitude*.3048))
     
    237237            centre_fuel = fuel_remaining - 2*side_tank_capacity
    238238            if centre_fuel<0: centre_fuel = 0.0
    239             results.append(long(round(centre_fuel/centre_tank_capacity*128.0*65536.0)))
     239            results.append(int(round(centre_fuel/centre_tank_capacity*128.0*65536.0)))
    240240        elif offset==0x0b78:  # Centre tank capacity (gallons)
    241             results.append(long(round(centre_tank_capacity*KGTOLBS/fuel_weight)))
     241            results.append(int(round(centre_tank_capacity*KGTOLBS/fuel_weight)))
    242242        elif offset==0x0b7c or \
    243243             offset==0x0b94:  # Left and right main tank level (%*128*65536)
    244244            fuel = fuel_remaining/2
    245245            if fuel>side_tank_capacity: fuel = side_tank_capacity
    246             results.append(long(round(fuel/side_tank_capacity*128.0*65536.0)))
     246            results.append(int(round(fuel/side_tank_capacity*128.0*65536.0)))
    247247        elif offset==0x0b80 or \
    248248             offset==0x0b98:  # Left and right main tank capacity (gallons)
    249             results.append(long(round(side_tank_capacity*KGTOLBS/fuel_weight)))
     249            results.append(int(round(side_tank_capacity*KGTOLBS/fuel_weight)))
    250250        elif offset in [0x0b84, 0x0b88, 0x0b8c, 0x0b90,
    251251                        0x0b9c, 0x0ba0, 0x0ba4, 0x0ba8,
     
    253253                        0x1254, 0x1258, 0x125c, 0x1260]:
    254254                              # Other tank capacities and levels
    255             results.append(long(0))
     255            results.append(int(0))
    256256        elif offset==0x023a:  # Second of time
    257257            results.append(int(tm[5]))
Note: See TracChangeset for help on using the changeset viewer.