meshcore 1.9.8.dev2__tar.gz → 1.9.8.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/PKG-INFO +1 -1
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/pyproject.toml +1 -1
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/commands.py +27 -7
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/reader.py +0 -1
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/.gitignore +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/LICENSE +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/README.md +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/ble_chat.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/ble_t1000_chan_msg.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/ble_t1000_custom_vars.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/ble_t1000_infos.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/ble_t1000_msg.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/ble_t1000_set_cv.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/mepo_mc_gps.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/pubsub_example.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/rf_packet_monitor.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_battery_monitor.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_chat.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_contacts.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_infos.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_msg.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_repeater_status.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_repeater_telemetry.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/serial_trace.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/tcp_chat.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/tcp_mchome_contacts.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/tcp_mchome_infos.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/tcp_mchome_msg.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/examples/tcp_mchome_readmsgs.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/pytest.ini +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/__init__.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/ble_cx.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/events.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/meshcore.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/packets.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/serial_cx.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/src/meshcore/tcp_cx.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/tests/README.md +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/tests/unit/test_commands.py +0 -0
- {meshcore-1.9.8.dev2 → meshcore-1.9.8.dev3}/tests/unit/test_events.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshcore
|
|
3
|
-
Version: 1.9.8.
|
|
3
|
+
Version: 1.9.8.dev3
|
|
4
4
|
Summary: Base classes for communicating with meshcore companion radios
|
|
5
5
|
Project-URL: Homepage, https://github.com/fdlamotte/meshcore_py
|
|
6
6
|
Project-URL: Issues, https://github.com/fdlamotte/meshcore_py/issues
|
|
@@ -195,7 +195,33 @@ class CommandHandler:
|
|
|
195
195
|
+ int(af).to_bytes(4, 'little')\
|
|
196
196
|
+ int(0).to_bytes(1, 'little')\
|
|
197
197
|
+ int(0).to_bytes(1, 'little'), [EventType.OK, EventType.ERROR])
|
|
198
|
-
|
|
198
|
+
|
|
199
|
+
async def set_other_params(self, manual_add_contacts : bool, telemetry_mode_base : int, telemetry_mode_loc : int) :
|
|
200
|
+
telemetry_mode = (telemetry_mode_base & 0b11) | ((telemetry_mode_loc & 0b11) << 2)
|
|
201
|
+
data = b"\x26" + manual_add_contacts.to_bytes(1) + telemetry_mode.to_bytes(1)
|
|
202
|
+
return await self.send(data, [EventType.OK, EventType.ERROR])
|
|
203
|
+
|
|
204
|
+
async def set_telemetry_mode_base(self, telemetry_mode_base : int) :
|
|
205
|
+
infos = (await self.send_appstart()).payload
|
|
206
|
+
return await self.set_other_params(
|
|
207
|
+
infos["manual_add_contacts"],
|
|
208
|
+
telemetry_mode_base,
|
|
209
|
+
infos["telemetry_mode_loc"])
|
|
210
|
+
|
|
211
|
+
async def set_telemetry_mode_loc(self, telemetry_mode_loc : int) :
|
|
212
|
+
infos = (await self.send_appstart()).payload
|
|
213
|
+
return await self.set_other_params(
|
|
214
|
+
infos["manual_add_contacts"],
|
|
215
|
+
infos["telemetry_mode_base"],
|
|
216
|
+
telemetry_mode_loc)
|
|
217
|
+
|
|
218
|
+
async def set_manual_add_contacts(self, manual_add_contacts:bool) :
|
|
219
|
+
infos = (await self.send_appstart()).payload
|
|
220
|
+
return await self.set_other_params(
|
|
221
|
+
manual_add_contacts,
|
|
222
|
+
infos["telemetry_mode_base"],
|
|
223
|
+
infos["telemetry_mode_loc"])
|
|
224
|
+
|
|
199
225
|
async def set_devicepin(self, pin: int) -> Event:
|
|
200
226
|
logger.debug(f"Setting device PIN to: {pin}")
|
|
201
227
|
return await self.send(b"\x25" \
|
|
@@ -306,15 +332,9 @@ class CommandHandler:
|
|
|
306
332
|
data = b"\x03\x00" + chan.to_bytes(1, 'little') + timestamp + msg.encode("utf-8")
|
|
307
333
|
return await self.send(data, [EventType.OK, EventType.ERROR])
|
|
308
334
|
|
|
309
|
-
async def send_other_params(self, manual_add_contacts : bool, telemetry_mode_base : bool, telemetry_mode_loc : bool) :
|
|
310
|
-
telemetry_mode = (telemetry_mode_base & 0b11) | ((telemetry_mode_loc & 0b11) << 2)
|
|
311
|
-
data = b"\x26" + manual_add_contacts.to_bytes(1) + telemetry_mode.to_bytes(1)
|
|
312
|
-
return await self.send(data, [EventType.OK, EventType.ERROR])
|
|
313
|
-
|
|
314
335
|
async def send_telemetry_req(self, dst: DestinationType) -> Event :
|
|
315
336
|
dst_bytes = _validate_destination(dst, prefix_length=32)
|
|
316
337
|
logger.debug(f"Asking telemetry to {dst_bytes.hex()}")
|
|
317
|
-
|
|
318
338
|
data = b"\x27\x00\x00\x00" + dst_bytes
|
|
319
339
|
return await self.send(data, [EventType.MSG_SENT, EventType.ERROR])
|
|
320
340
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|