def GetAvionicsServoLimits():
  """Get the avionics servo mechanical limits for the current system."""
  sys_conf = system_config.SystemConfig.GetSystemConfigBySerial(
      _CONFIG['system']['wing_serial'])
  config_file = os.path.join(makani.HOME,
                             'avionics/servo/firmware/config_params.yaml')
  net_conf = network_config.NetworkConfig()

  yaml_keys = [sys_conf.config[net_conf.GetAioNode('servo_%s' % s.lower())]
               for s in _SERVOS]
  limits = [codec.DecodeYamlFile(config_file, key) for key in yaml_keys]
  return {_SERVOS[i]: (limits[i].servo_min_limit, limits[i].servo_max_limit)
          for i in range(len(_SERVOS))}