mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
config/EDDN: Rename OUT_SYS_DELAY to OUT_EDDN_DO_NOT_DELAY
The sense of this `output` flag has been inverted (always?) for a long time. 1. I have the option "Delay sending until docked" showing as *off* in the UI. 2. My config.output value is `100000000001`. 3. The value of this flag is `4096`, which means 12th bit (starting from 1, not zero). 4. So I have the bit set, but the option visibly off. So, rename this both to be more pertinent to its use *and* to be correct as to what `True` for it means.
This commit is contained in:
parent
598e54eaa4
commit
3a57b53bbd
@ -176,7 +176,7 @@ class AbstractConfig(abc.ABC):
|
||||
# OUT_SYS_AUTO = 512 # Now always automatic
|
||||
OUT_MKT_MANUAL = 1024
|
||||
OUT_SYS_EDDN = 2048
|
||||
OUT_SYS_DELAY = 4096
|
||||
OUT_EDDN_DO_NOT_DELAY = 4096
|
||||
|
||||
app_dir_path: pathlib.Path
|
||||
plugin_dir_path: pathlib.Path
|
||||
|
@ -349,6 +349,9 @@ class EDDNSender:
|
||||
:param msg: Fully formed, string, message.
|
||||
:return: `True` for "now remove this message from the queue"
|
||||
"""
|
||||
|
||||
# TODO: Check if user options require us to send at this time.
|
||||
|
||||
should_return, new_data = killswitch.check_killswitch('plugins.eddn.send', json.loads(msg))
|
||||
if should_return:
|
||||
logger.warning('eddn.send has been disabled via killswitch. Returning.')
|
||||
@ -500,6 +503,9 @@ class EDDN:
|
||||
:param cmdr: the CMDR to use as the uploader ID.
|
||||
:param msg: the payload to send.
|
||||
"""
|
||||
|
||||
# TODO: Check if the global 'Send to EDDN' option is off
|
||||
|
||||
to_send: OrderedDictT[str, OrderedDict[str, Any]] = OrderedDict([
|
||||
('$schemaRef', msg['$schemaRef']),
|
||||
('header', OrderedDict([
|
||||
@ -1854,7 +1860,7 @@ def plugin_prefs(parent, cmdr: str, is_beta: bool) -> Frame:
|
||||
)
|
||||
|
||||
this.eddn_system_button.grid(padx=BUTTONX, pady=(5, 0), sticky=tk.W)
|
||||
this.eddn_delay = tk.IntVar(value=(output & config.OUT_SYS_DELAY) and 1)
|
||||
this.eddn_delay = tk.IntVar(value=(output & config.OUT_EDDN_DO_NOT_DELAY) and 1)
|
||||
# Output setting under 'Send system and scan data to the Elite Dangerous Data Network' new in E:D 2.2
|
||||
this.eddn_delay_button = nb.Checkbutton(
|
||||
eddnframe,
|
||||
@ -1891,7 +1897,7 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None:
|
||||
& (config.OUT_MKT_TD | config.OUT_MKT_CSV | config.OUT_SHIP | config.OUT_MKT_MANUAL)) +
|
||||
(this.eddn_station.get() and config.OUT_MKT_EDDN) +
|
||||
(this.eddn_system.get() and config.OUT_SYS_EDDN) +
|
||||
(this.eddn_delay.get() and config.OUT_SYS_DELAY)
|
||||
(this.eddn_delay.get() and config.OUT_EDDN_DO_NOT_DELAY)
|
||||
)
|
||||
|
||||
|
||||
|
2
prefs.py
2
prefs.py
@ -1221,7 +1221,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
(self.out_csv.get() and config.OUT_MKT_CSV) +
|
||||
(config.OUT_MKT_MANUAL if not self.out_auto.get() else 0) +
|
||||
(self.out_ship.get() and config.OUT_SHIP) +
|
||||
(config.get_int('output') & (config.OUT_MKT_EDDN | config.OUT_SYS_EDDN | config.OUT_SYS_DELAY))
|
||||
(config.get_int('output') & (config.OUT_MKT_EDDN | config.OUT_SYS_EDDN | config.OUT_EDDN_DO_NOT_DELAY))
|
||||
)
|
||||
|
||||
config.set(
|
||||
|
Loading…
x
Reference in New Issue
Block a user