From cfae325be4de579ca7e6d79426ebeaa3c5e2ffb3 Mon Sep 17 00:00:00 2001 From: Raine Date: Sun, 15 Oct 2023 18:06:19 +0200 Subject: [PATCH] fix: remove single bits as they're only making the protocol harder to interpret --- doc/proto.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/proto.md b/doc/proto.md index 18634de..33b7f4e 100644 --- a/doc/proto.md +++ b/doc/proto.md @@ -52,19 +52,19 @@ The master will not track the broken packet's `packet_id`, so the slave can send Domo has a data framework reliant on data types. These define what kind of data the property holds. -| `data_type` | physical type (rust types) | size | virtual type | description | -|-------------|----------------------------|-----------|---------------------|------------------------------------------------| -| `0x0*` | | | | **Basic** | -| `0x00` | `None` | 0 bytes | Nothing | Nothing, mostly used internally or as example. | -| `0x01` | `bool` | 1 bit | Switch | A simple switch with two states. | -| `0x02` | `u8` | 1 byte | Slider | A simple slider with u8 precision. | -| `0x03` | `[u8; 256]` | 256 bytes | Text | A simple bit of text. | -| `0x1*` | | | | **Cosmetic** | -| `0x10` | `[u8; 3]` | 3 bytes | Color | An RGB value. | -| `0x9*` | | | | **Time & Space** | -| `0x90` | `u64` | 8 bytes | Seconds | A simple value that is in seconds. | -| `0xF*` | | | | **Domo types** | -| `0xF0` | `[u8; 4]` | 4 bytes | Domo node reference | A reference to a node. | +| `prop_data_type` | physical type (rust types) | size | virtual type | description | +|------------------|----------------------------|-----------|---------------------|-----------------------------------------------------------------------------| +| `0x0*` | | | | **Basic** | +| `0x00` | `None` | 0 bytes | Nothing | Nothing, mostly used internally or as example. | +| `0x01` | `bool` | 1 byte | Switch | A simple switch with two states. `0x00` = off, `0x01` = on, `0x02` = toggle | +| `0x02` | `u8` | 1 byte | Slider | A simple slider with u8 precision. | +| `0x03` | `[u8; 256]` | 256 bytes | Text | A simple bit of text. | +| `0x1*` | | | | **Cosmetic** | +| `0x10` | `[u8; 3]` | 3 bytes | Color | An RGB value. | +| `0x9*` | | | | **Time & Space** | +| `0x90` | `u64` | 8 bytes | Seconds | A simple value that is in seconds. | +| `0xF*` | | | | **Domo types** | +| `0xF0` | `[u8; 4]` | 4 bytes | Domo node reference | A reference to a node. | # Commands @@ -120,11 +120,11 @@ there is no extra data required. #### Command data -| offset | size | name | description | reserved | example | -|--------|-----------|-----------------|---------------------------------------------|----------|---------| -| `0x14` | 32 bytes | `property_name` | The name of the property as a UTF-8 string. | no | "Power" | -| `0x34` | 1 byte | `data_type` | The type of data; see "Data types". | no | `0x01` | -| `0x35` | **1 bit** | `read_only` | Whether the property is readonly. | no | `0b0` | +| offset | size | name | description | reserved | example | +|--------|----------|-----------------|--------------------------------------------------------------------|----------|---------| +| `0x14` | 32 bytes | `property_name` | The name of the property as a UTF-8 string. | no | "Power" | +| `0x34` | 1 byte | `data_type` | The type of data; see "Data types". | no | `0x01` | +| `0x35` | 1 byte | `read_only` | Whether the property is readonly.
(`0x00` = no, `0x01` = yes) | no | `0x00` | ### `0x04` - Remove property