Release v0.32.0 — event times you can trust, and Series 4 mapped #54
No files matched your search
@@ -55,7 +55,7 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
|
||||
from micromate.client import MicromateClient, _content # noqa: E402
|
||||
from micromate.protocol import ProtocolError # noqa: E402
|
||||
from micromate.protocol import CHUNK_SIZE, ProtocolError # noqa: E402
|
||||
from minimateplus.transport import TcpTransport # noqa: E402
|
||||
|
||||
|
||||
@@ -380,7 +380,14 @@ def main() -> int:
|
||||
for ref in mm.iter_events():
|
||||
if ref.key_hex not in want_keys:
|
||||
continue
|
||||
n_chunks = -(-ref.size // 1024)
|
||||
# ⚠ Use the size actually requested. This printed
|
||||
# `size // 1024` -- THOR's chunk size -- while the
|
||||
# download used the 16 KB default, so it reported 71
|
||||
# requests for a walk that made 5. A diagnostic that
|
||||
# misreports what it did is worse than one that says
|
||||
# nothing, and this one nearly had me reading a working
|
||||
# 16 KB download as a broken 1 KB one.
|
||||
n_chunks = -(-ref.size // CHUNK_SIZE)
|
||||
note = (" <- past 64 KB, carries into params[1]"
|
||||
if ref.size > 0x10000 else "")
|
||||
t1 = time.monotonic()
|
||||
@@ -396,8 +403,8 @@ def main() -> int:
|
||||
check = ("PVS %+.4f%%" % (100 * err) if err is not None
|
||||
else "PVS n/a (histogram)")
|
||||
print(f" {ref.key_hex} {ref.record_type:9} "
|
||||
f"{ref.size:7} B {n_chunks:3} chunks {dt:5.1f} s "
|
||||
f"{n:6} samples {check}{note}")
|
||||
f"{ref.size:7} B {n_chunks:3} req @ {CHUNK_SIZE} B "
|
||||
f"{dt:5.1f} s {n:6} samples {check}{note}")
|
||||
|
||||
except ProtocolError as e:
|
||||
print(f"\n ABORTED {type(e).__name__}: {e}")
|
||||
|
||||
@@ -1662,6 +1662,28 @@ through a record-type discriminator (`0x2C` partial vs `0x46` full) *on its
|
||||
event walk*, so partial records and events share one chain. Here the monitor
|
||||
log has its own cursor and the event chain never sees it.
|
||||
|
||||
### USB identification — the Micromate's own ports
|
||||
|
||||
| device | VID:PID | appears as |
|
||||
|---|---|---|
|
||||
| **Micromate `PC` port (USB-B)** | **`2504:0300`** — *Instantel Inc. MICROMATE COM PORT* | `/dev/ttyACM*`, CDC-ACM |
|
||||
| Sabrent cable (works on the USB-A host port) | `0403:*` — FTDI | `/dev/ttyUSB*` |
|
||||
| Benfei cable (does **not** work) | `067b:*` — Prolific PL2303 | `/dev/ttyUSB*` |
|
||||
|
||||
⚠ **Address the unit by `/dev/serial/by-id/`, not `/dev/ttyACM<n>`.** The number
|
||||
shifts whenever any other CDC-ACM device is plugged in, and this has already cost
|
||||
a debugging session — the tool was aimed at a TMI-Seismo MCU and timed out
|
||||
looking like a dead unit. The stable name is
|
||||
`usb-Instantel_Inc._MICROMATE_COM_PORT_V1.00-if00`.
|
||||
|
||||
The `PC` port is a USB **device** port, so it is safe to plug and unplug freely.
|
||||
The cold-boot requirement applies only to the USB-A **host** port, where the
|
||||
modem cable goes.
|
||||
|
||||
**Passing one through to a Proxmox guest** works and hot-plugs, no VM restart:
|
||||
`qm set <vmid> -usb0 host=2504:0300`. Bind by VID:PID rather than bus-port so it
|
||||
survives a replug.
|
||||
|
||||
#### 🔑 Every response has an 11-byte prefix — and its length byte lies
|
||||
|
||||
**Content starts at `data[11]`.** One rule, every command.
|
||||
|
||||
Reference in new issue
Block a user