Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

Commit

Permalink
updates for 1.3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkinney committed Apr 11, 2022
1 parent 8d6b25a commit f28f44c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 109 deletions.
72 changes: 8 additions & 64 deletions meshtastic_flasher/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
}
},
"canned_message_module_about": {
"doc_url": "https://meshtastic.org/docs/settings/canned-message-module",
"doc_url": "https://meshtastic.org/docs/software/modules/canned-message-module",
"label": {
"de": "Modul f\u00fcr Schnellnachrichten",
"en": "Canned Message Module",
Expand Down Expand Up @@ -873,7 +873,7 @@
}
},
"ext_notification_module_about": {
"doc_url": "https://meshtastic.org/docs/settings/external-notification-module",
"doc_url": "https://meshtastic.org/docs/software/modules/ext-notif-module",
"label": {
"de": "Benachrichtigungsmodul",
"en": "External Notification Module",
Expand Down Expand Up @@ -1404,34 +1404,6 @@
"zh": "GPS \u6700\u5927 DOP"
}
},
"gps_operation": {
"description": {
"de": "Wie die GPS-Hardware in diesem Ger\u00e4t betrieben wird.",
"en": "How the GPS hardware in this unit is operated.",
"es": "C\u00f3mo funciona el hardware del GPS en esta unidad.",
"et": "Kuidas selle seadme GPS-riistvara t\u00f6\u00f6tab.",
"fr": "Comment fonctionne le mat\u00e9riel GPS de cet appareil.",
"it": "Come funziona l'hardware GPS in questa unit\u00e0.",
"ja": "\u672c\u6a5f\u306eGPS\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306e\u904b\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3002",
"pl": "Jak dzia\u0142a sprz\u0119t GPS w tym urz\u0105dzeniu.",
"ro": "Modul de func\u021bionare a hardware-ului GPS din aceast\u0103 aparat.",
"ru": "\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0443\u0440\u0430 GPS \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.",
"zh": "\u672c\u88c5\u7f6e\u4e2d\u7684 GPS \u786c\u4ef6\u662f\u5982\u4f55\u64cd\u4f5c\u7684\u3002"
},
"label": {
"de": "GPS-Betrieb",
"en": "GPS Operation",
"es": "Funcionamiento del GPS",
"et": "GPS-i kasutamine",
"fr": "Fonctionnement du GPS",
"it": "Funzionamento del GPS",
"ja": "GPS\u64cd\u4f5c",
"pl": "Dzia\u0142anie GPS",
"ro": "Func\u021bionarea GPS",
"ru": "\u0420\u0430\u0431\u043e\u0442\u0430 GPS",
"zh": "GPS \u64cd\u4f5c"
}
},
"help": {
"text": {
"de": "Hilfe",
Expand Down Expand Up @@ -1944,34 +1916,6 @@
"zh": "\u7eac\u5ea6"
}
},
"location_share": {
"description": {
"de": "Wie der Standort mit anderen Knoten (oder dem lokalen Telefon) geteilt wird.",
"en": "How location is shared with other nodes (or the local phone).",
"es": "C\u00f3mo se comparte la ubicaci\u00f3n con otros nodos (o el tel\u00e9fono m\u00f3vil).",
"et": "Kuidas jagatakse asukohta teiste s\u00f5lmedega (v\u00f5i kohaliku telefoniga).",
"fr": "Comment la localisation est partag\u00e9e avec les autres n\u0153uds (ou le t\u00e9l\u00e9phone local).",
"it": "Come la posizione \u00e8 condivisa con altri nodi (o con il telefono locale).",
"ja": "\u4f4d\u7f6e\u60c5\u5831\u304c\u4ed6\u306e\u30ce\u30fc\u30c9\uff08\u307e\u305f\u306f\u30ed\u30fc\u30ab\u30eb\u96fb\u8a71\uff09\u3068\u3069\u306e\u3088\u3046\u306b\u5171\u6709\u3055\u308c\u308b\u304b\u3002",
"pl": "W jaki spos\u00f3b lokalizacja jest udost\u0119pniana innym w\u0119z\u0142om (lub telefonowi lokalnemu).",
"ro": "Modul \u00een care loca\u021bia este partajat\u0103 cu alte noduri (sau cu telefonul local).",
"ru": "\u041a\u0430\u043a \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c \u0443\u0437\u043b\u0430\u043c (\u0438\u043b\u0438 \u043c\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443).",
"zh": "\u4e0e\u5176\u4ed6\u8282\u70b9\uff08\u6216\u672c\u5730\u5ba2\u6237\u7aef\uff09\u5171\u4eab\u4f4d\u7f6e\u3002"
},
"label": {
"de": "Standort-Sharing",
"en": "Location sharing",
"es": "Compartir la ubicaci\u00f3n",
"et": "Asukoha jagamine",
"fr": "Partage de l'emplacement",
"it": "Condivisione della posizione",
"ja": "\u4f4d\u7f6e\u60c5\u5831\u5171\u6709",
"pl": "Udost\u0119pnianie lokalizacji",
"ro": "Partajarea loca\u021biei",
"ru": "\u0418\u0437\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438",
"zh": "\u4f4d\u7f6e\u5171\u4eab"
}
},
"lon": {
"description": {
"de": "Der L\u00e4ngengrad ist eine geografische Koordinate, die die Ost-West-Position eines Punktes auf der Erdoberfl\u00e4che angibt.",
Expand Down Expand Up @@ -3119,7 +3063,7 @@
}
},
"range_test_module_about": {
"doc_url": "https://meshtastic.org/docs/settings/range-test-module",
"doc_url": "https://meshtastic.org/docs/software/modules/range-test-module",
"label": {
"de": "Reichweitentest",
"en": "Range Test Module",
Expand Down Expand Up @@ -3305,7 +3249,7 @@
}
},
"rotary1_about": {
"doc_url": "https://meshtastic.org/docs/settings/rotary-encoder-module",
"doc_url": "https://meshtastic.org/docs/software/modules/canned-message-module#rotary-encoder",
"label": {
"de": "Drehgeber-Modul",
"en": "Rotary Encoder Module",
Expand Down Expand Up @@ -3669,7 +3613,7 @@
}
},
"serial_module_about": {
"doc_url": "https://meshtastic.org/docs/settings/serial-module",
"doc_url": "https://meshtastic.org/docs/software/modules/serial-module",
"label": {
"de": "Serielles Modul",
"en": "Serial Module",
Expand Down Expand Up @@ -3940,7 +3884,7 @@
}
},
"store_forward_module_about": {
"doc_url": "https://meshtastic.org/docs/settings/store-and-forward-module",
"doc_url": "https://meshtastic.org/docs/software/modules/store-forward-module",
"label": {
"de": "Modul Zwischenspeicher",
"en": "Store and Forward Module",
Expand Down Expand Up @@ -4169,7 +4113,7 @@
}
},
"telemetry_module_about": {
"doc_url": "https://meshtastic.org/docs/settings/telemetry-module",
"doc_url": "https://meshtastic.org/docs/software/modules/telemetry-module",
"label": {
"de": "Telemetrie-Modul",
"en": "Telemetry Module",
Expand Down Expand Up @@ -4846,4 +4790,4 @@
},
"max_size": 33
}
}
}
12 changes: 6 additions & 6 deletions meshtastic_flasher/plugins_canned_message_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def __init__(self, parent=None):
self.canned_message_module_allow_input_source = QLineEdit()
self.canned_message_module_allow_input_source.setToolTip(self.main.description('canned_message_module_allow_input_source'))
self.canned_message_module_messages = QTextEdit()
# TODO: where is the canned_message_module_messages in protobufs?
self.canned_message_module_messages.setToolTip(self.main.description('canned_message_module_messages'))
self.canned_message_module_send_bell = QCheckBox()
self.canned_message_module_send_bell.setToolTip(self.main.description('canned_message_module_send_bell'))
Expand Down Expand Up @@ -86,10 +85,11 @@ def get_values(self):
if self.prefs.canned_message_module_send_bell and self.prefs.canned_message_module_send_bell is True:
self.canned_message_module_send_bell.setChecked(True)

if self.prefs.canned_message_module_messages:
self.canned_message_module_messages.setText(f'{self.prefs.canned_message_module_messages}')
else:
self.canned_message_module_messages.setText("")
# TODO: change me
#if self.prefs.canned_message_module_messages:
#self.canned_message_module_messages.setText(f'{self.prefs.canned_message_module_messages}')
#else:
#self.canned_message_module_messages.setText("")


except Exception as e:
Expand All @@ -105,7 +105,7 @@ def write_values(self):
setPref(prefs, 'canned_message_module_enabled', f'{self.canned_message_module_enabled.isChecked()}')
setPref(prefs, 'canned_message_module_allow_input_source', f'{self.canned_message_module_allow_input_source.text()}')
setPref(prefs, 'canned_message_module_send_bell', f'{self.canned_message_module_send_bell.isChecked()}')
setPref(prefs, 'canned_message_module_messages', self.canned_message_module_messages.toPlainText())
# TODO setPref(prefs, 'canned_message_module_messages', self.canned_message_module_messages.toPlainText())
self.interface.getNode(BROADCAST_ADDR).writeConfig()

except Exception as e:
Expand Down
31 changes: 1 addition & 30 deletions meshtastic_flasher/position_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ def __init__(self, parent=None):
self.fixed_position_button = QPushButton("Fixed Position")
self.fixed_position_button.clicked.connect(self.fixed_position)

self.location_share = QComboBox()
self.location_share.setToolTip(self.main.description('location_share'))
self.location_share.setMinimumContentsLength(17)
self.gps_operation = QComboBox()
self.gps_operation.setToolTip(self.main.description('gps_operation'))
self.gps_operation.setMinimumContentsLength(17)
self.gps_format = QComboBox()
self.gps_format.setToolTip(self.main.description('gps_format'))
self.gps_format.setMinimumContentsLength(17)
Expand Down Expand Up @@ -100,8 +94,6 @@ def __init__(self, parent=None):
form_layout.addRow('', self.position_flag_timestamp)
form_layout.addRow(self.main.label("position_flags"), self.position_flags)
form_layout.addRow("", self.fixed_position_button)
form_layout.addRow(self.main.label("location_share"), self.location_share)
form_layout.addRow(self.main.label("gps_operation"), self.gps_operation)
form_layout.addRow(self.main.label("gps_format"), self.gps_format)
form_layout.addRow(self.main.label("gps_accept_2d"), self.gps_accept_2d)
form_layout.addRow(self.main.label("gps_max_dop"), self.gps_max_dop)
Expand Down Expand Up @@ -207,32 +199,13 @@ def get_values(self):
self.position_flags.setText("0")
self.set_position_flags(self.position_flags.text())

temp = 0
if self.prefs.location_share:
temp = int(self.prefs.location_share)
self.location_share.clear()
desc = meshtastic.radioconfig_pb2.LocationSharing.DESCRIPTOR
for k,v in desc.values_by_name.items():
self.location_share.addItem(k, v.number)
if v.number == temp:
self.location_share.setCurrentIndex(v.number)

temp = 0
if self.prefs.gps_operation:
temp = int(self.prefs.gps_operation)
self.gps_operation.clear()
desc = meshtastic.radioconfig_pb2.GpsOperation.DESCRIPTOR
for k,v in desc.values_by_name.items():
self.gps_operation.addItem(k, v.number)
if v.number == temp:
self.gps_operation.setCurrentIndex(v.number)

temp = 0
if self.prefs.gps_format:
temp = int(self.prefs.gps_format)
self.gps_format.clear()
desc = meshtastic.radioconfig_pb2.GpsCoordinateFormat.DESCRIPTOR
for k,v in desc.values_by_name.items():
print(f'gps_format k:{k} v.number:{v.number}')
self.gps_format.addItem(k, v.number)
if v.number == temp:
self.gps_format.setCurrentIndex(v.number)
Expand Down Expand Up @@ -263,8 +236,6 @@ def write_values(self):
setPref(prefs, 'position_broadcast_secs', zero_if_blank(self.position_broadcast_secs.text()))
setPref(prefs, 'position_broadcast_smart_disabled', f'{self.position_broadcast_smart_disabled.isChecked()}')
setPref(prefs, 'position_flags', self.position_flags.text())
setPref(prefs, 'location_share', f'{self.location_share.currentData()}')
setPref(prefs, 'gps_operation', f'{self.gps_operation.currentData()}')
setPref(prefs, 'gps_format', f'{self.gps_format.currentData()}')
setPref(prefs, 'gps_accept_2d', f'{self.gps_accept_2d.isChecked()}')
setPref(prefs, 'gps_max_dop', zero_if_blank(self.gps_max_dop.text()))
Expand Down
9 changes: 0 additions & 9 deletions meshtastic_flasher/radio_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ def __init__(self, parent=None):
#self.ignore_incoming = QLineEdit()
self.is_lora_tx_disabled = QCheckBox()
self.is_lora_tx_disabled.setToolTip(self.main.description('is_lora_tx_disabled'))
self.send_owner_interval = QLineEdit()
self.send_owner_interval.setToolTip(self.main.description('send_owner_interval'))

# Add a button box
self.button_box = QDialogButtonBox()
Expand All @@ -70,7 +68,6 @@ def __init__(self, parent=None):
form_layout.addRow(self.main.label("hop_limit"), self.hop_limit)
#form_layout.addRow(self.main.label("Ignore Incoming"), self.ignore_incoming)
form_layout.addRow(self.main.label("is_lora_tx_disabled"), self.is_lora_tx_disabled)
form_layout.addRow(self.main.label("send_owner_interval"), self.send_owner_interval)
form_layout.addRow("", self.button_box)
self.setLayout(form_layout)

Expand Down Expand Up @@ -132,11 +129,6 @@ def get_values(self):
if self.prefs.is_lora_tx_disabled and self.prefs.is_lora_tx_disabled is True:
self.is_lora_tx_disabled.setChecked(True)

if self.prefs.send_owner_interval:
self.send_owner_interval.setText(f'{self.prefs.send_owner_interval}')
else:
self.send_owner_interval.setText("0")

except Exception as e:
print(f'Exception:{e}')

Expand All @@ -155,7 +147,6 @@ def write_values(self):
setPref(prefs, 'hop_limit', zero_if_blank(self.hop_limit.text()))
#setPref(prefs, 'ignore_incoming', zero_if_blank(self.ignore_incoming.text()))
setPref(prefs, 'is_lora_tx_disabled', f'{self.is_lora_tx_disabled.isChecked()}')
setPref(prefs, 'send_owner_interval', zero_if_blank(self.send_owner_interval.text()))
self.interface.getNode(BROADCAST_ADDR).writeConfig()

except Exception as e:
Expand Down

0 comments on commit f28f44c

Please sign in to comment.