From e8d2a96a00713608ba4a6a36c9bea4ce06886619 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Thu, 25 Mar 2021 07:31:31 +0800 Subject: [PATCH] add a disconnect message --- docs/docs.md | 1 + mesh.proto | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/docs/docs.md b/docs/docs.md index aa4b9aa..60fb1dc 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -659,6 +659,7 @@ Once the write completes the phone can assume it is handled. | ----- | ---- | ----- | ----------- | | packet | [MeshPacket](#MeshPacket) | | send this packet on the mesh | | want_config_id | [uint32](#uint32) | | phone wants radio to send full node db to the phone, This is typically the first packet sent to the radio when the phone gets a bluetooth connection. The radio will respond by sending back a MyNodeInfo, a owner, a radio config and a series of FromRadio.node_infos, and config_complete the integer you write into this field will be reported back in the config_complete_id response this allows clients to never be confused by a stale old partially sent config. | +| disconnect | [bool](#bool) | | Tell API server we are disconnecting now. This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. (Sending this message is optional for clients) | diff --git a/mesh.proto b/mesh.proto index a8fa4ab..3e1e0ee 100644 --- a/mesh.proto +++ b/mesh.proto @@ -873,5 +873,12 @@ message ToRadio { * a stale old partially sent config. */ uint32 want_config_id = 100; + + /* + * Tell API server we are disconnecting now. This is useful for serial links where there is no hardware/protocol based + * notification that the client has dropped the link. + * (Sending this message is optional for clients) + */ + bool disconnect = 104; } }