Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct ardf label and send online all controls (option) #443

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion languages/ru_RU/LC_MESSAGES/sportorg.po
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ msgid "by scores"
msgstr "по баллам"

msgid "ardf"
msgstr "ADRF"
msgstr "ARDF"

msgid "rogain scores"
msgstr "рогейн (45КП = 4балла, 78КП = 7баллов)"
Expand Down Expand Up @@ -1521,6 +1521,9 @@ msgstr "Первый КП"
msgid "CP increment"
msgstr "Инкремент КП"

msgid "Sending the entire contents of the chip"
msgstr "Отправка всего содержимого чипа"

msgid "Online results sending"
msgstr "Отправка онлайн результатов"

Expand Down
12 changes: 12 additions & 0 deletions sportorg/gui/dialogs/live_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def init_ui(self):
self.item_live_enabled = QCheckBox(translate('Enabled'))
self.layout.addRow(self.item_live_enabled)

self.item_sending_all_controls = QCheckBox(
translate('Sending the entire contents of the chip')
)
self.item_sending_all_controls.setChecked(True)
self.layout.addRow(self.item_sending_all_controls)

self.item_result_sending = QCheckBox(translate('Online results sending'))
self.item_result_sending.setChecked(True)
self.layout.addRow(self.item_result_sending)
Expand Down Expand Up @@ -128,6 +134,7 @@ def on_cp_sending_state_changed(self):

def on_enable_checkbox_state_changed(self):
state = self.item_live_enabled.isChecked()
self.item_sending_all_controls.setEnabled(state)
self.item_result_sending.setEnabled(state)
self.item_cp_sending.setEnabled(state)
self.online_cp_box.setEnabled(state)
Expand All @@ -151,6 +158,7 @@ def set_values(self):
urls = [url]
live_enabled = obj.get_setting('live_enabled', False)

live_sending_all_controls = obj.get_setting('live_sending_all_controls', False)
live_results_enabled = obj.get_setting('live_results_enabled', True)
live_cp_enabled = obj.get_setting('live_cp_enabled', False)
live_cp_code = obj.get_setting('live_cp_code', '10')
Expand All @@ -160,6 +168,7 @@ def set_values(self):

self.item_url.setText(encode_urls(urls))
self.item_live_enabled.setChecked(live_enabled)
self.item_sending_all_controls.setChecked(live_sending_all_controls)
self.item_result_sending.setChecked(live_results_enabled)
self.item_cp_sending.setChecked(live_cp_enabled)
self.online_cp_from_finish_code.setValue(int(live_cp_code))
Expand All @@ -173,6 +182,9 @@ def apply_changes_impl(self):
obj = race()
obj.set_setting('live_urls', decode_urls(self.item_url.text()))
obj.set_setting('live_enabled', self.item_live_enabled.isChecked())
obj.set_setting(
'live_sending_all_controls', self.item_sending_all_controls.isChecked()
)
obj.set_setting('live_results_enabled', self.item_result_sending.isChecked())
obj.set_setting('live_cp_enabled', self.item_cp_sending.isChecked())
obj.set_setting(
Expand Down
1 change: 0 additions & 1 deletion sportorg/gui/dialogs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
get_current_race_index,
move_down_race,
move_up_race,
race,
races,
set_current_race_index,
)
Expand Down
5 changes: 4 additions & 1 deletion sportorg/modules/live/orgeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ def _get_person_obj(data, race_data, result=None):
obj['splits'] = []
splits = []
for split in result['splits']:
if split['is_correct']:
if (
split['is_correct']
or race_data['settings']['live_sending_all_controls'] == True
):
splits.append(split)
for i in range(len(splits)):
# fmt: off
Expand Down
Loading