Changeset 1123:f0334593281d for src/mlx/config.py
- Timestamp:
- 12/10/23 09:50:04 (5 months ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r1098 r1123 255 255 self._enableApproachCallouts = False 256 256 self._speedbrakeAtTD = True 257 self._soundSet = 0 257 258 258 259 self._enableChecklists = False … … 672 673 if speedbrakeAtTD!=self._speedbrakeAtTD: 673 674 self._speedbrakeAtTD = speedbrakeAtTD 675 self._modified = True 676 677 @property 678 def soundSet(self): 679 """Get the number of the sound set to use.""" 680 return self._soundSet 681 682 @soundSet.setter 683 def soundSet(self, soundSet): 684 """Set the number of the sound set.""" 685 if soundSet!=self._soundSet: 686 self._soundSet = soundSet 674 687 self._modified = True 675 688 … … 856 869 self._speedbrakeAtTD = self._getBoolean(config, "sounds", 857 870 "speedbrakeAtTD", True) 871 self._soundSet = self._getInteger(config, "sounds", 872 "soundSet", 0) 858 873 859 874 self._enableChecklists = self._getBoolean(config, "sounds", … … 963 978 config.set("sounds", "speedbrakeAtTD", 964 979 "yes" if self._speedbrakeAtTD else "no") 980 config.set("sounds", "soundSet", str(self._soundSet)) 965 981 966 982 config.set("sounds", "enableChecklists", … … 998 1014 otherwise the default.""" 999 1015 return config.getboolean(section, option) \ 1016 if config.has_option(section, option) \ 1017 else default 1018 1019 def _getInteger(self, config, section, option, default): 1020 """Get the given option as an integer, if found in the given config, 1021 otherwise the default.""" 1022 return config.getint(section, option) \ 1000 1023 if config.has_option(section, option) \ 1001 1024 else default … … 1109 1132 print(" enableApproachCallouts:", self._enableApproachCallouts) 1110 1133 print(" speedbrakeAtTD:", self._speedbrakeAtTD) 1134 print(" soundSet:", self._soundSet) 1111 1135 1112 1136 print(" enableChecklists:", self._enableChecklists)
Note:
See TracChangeset
for help on using the changeset viewer.