Ignore:
Timestamp:
01/02/16 12:09:24 (8 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

The usage of RPC can be configured (re #283).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/config.py

    r733 r738  
    258258        if secondaryInstallation:
    259259            self._updateURL += "/exp"
     260        self._useRPC = True
    260261
    261262        self._messageTypeLevels = {}
     
    666667        if updateURL!=self._updateURL:
    667668            self._updateURL = updateURL
     669            self._modified = True
     670
     671    @property
     672    def useRPC(self):
     673        """Determine if RPC calls should be used."""
     674        return self._useRPC
     675
     676    @useRPC.setter
     677    def useRPC(self, useRPC):
     678        """Set whether RPC calls should be used."""
     679        if useRPC!=self._useRPC:
     680            self._useRPC = useRPC
    668681            self._modified = True
    669682
     
    775788                                    Config.DEFAULT_UPDATE_URL +
    776789                                    ("/exp" if secondaryInstallation else ""))
     790        self._useRPC = self._getBoolean(config, "general", "useRPC", True)
    777791
    778792        for aircraftType in const.aircraftTypes:
     
    867881        config.set("update", "url", self._updateURL)
    868882
     883        config.set("general", "useRPC",
     884                   "yes" if self._useRPC else "no")
     885
    869886        config.add_section(Checklist.SECTION)
    870887        config.add_section(ApproachCallouts.SECTION)
     
    10011018        print "  autoUpdate:", self._autoUpdate
    10021019        print "  updateURL:", self._updateURL
     1020        print "  useRPC:", self._useRPC
    10031021
    10041022        print "  messageTypeLevels:"
Note: See TracChangeset for help on using the changeset viewer.