@@ -92,80 +92,3 @@ Byte(s) | Variable | Data Type | Min | Max | Example |
9292 [ 5-n] | Data / Message / Payload | Varies |
9393 [ n+1] | End Byte 1 | 'Y' |
9494 [ n+2] | End Byte 2 | 'B' |
95-
96-
97- # BELOW THIS IS THE OLD ONE, ONLY REFERENCE I WILL DELETE
98-
99-
100- ## UART Message Structure
101-
102- -----
103-
104- | | Byte 1 | Byte 2 | Byte 3–4 |
105- | --------------| -------------| ----------------| -----------------|
106- | ** Variable** | msg_type | command_code | command_value |
107- | ** Type** | uint8_t | uint8_t | uint16_t |
108- | ** Min Value** | 2 | 0 | 0 |
109- | ** Max Value** | 2 | 255 | 65535 |
110- | ** Example** | 2 | 1 | 100 |
111-
112- - ** msg_type = 2** (example) means "User Command" from the HMI.
113- - ** command_code** could represent which user action was triggered (e.g., 1 = up button, 2 = down button, 10 = new setpoint, etc.).
114- - ** command_value** is the numeric parameter (e.g., 100 = setpoint = 100, or 45 = brightness, etc.).
115-
116- ----
117-
118- | | Byte 1 | Bytes 2–58 |
119- | --------------| -------------| --------------------|
120- | ** Variable** | msg_type | display_msg |
121- | ** Type** | uint8_t | char array (uint8_t) |
122- | ** Min Value** | 3 | char[ 1] |
123- | ** Max Value** | 3 | char[ 57] (null-terminated) |
124- | ** Example** | 3 | "HELLO USER" |
125-
126- - ** msg_type = 3** means a "Display Update Request."
127- - ** display_msg** is a character array (up to 57 bytes). Could be zero-terminated if needed.
128-
129- ----
130- ## Sensor Broadcast Data
131-
132- | | Byte 1 | Byte 2 | Bytes 3–4 |
133- | --------------| -------------| ---------------| ----------------|
134- | ** Variable** | msg_type | sensor_num | sensor_val |
135- | ** Type** | uint8_t | uint8_t | uint16_t |
136- | ** Example** | 1 | 3 (humidity) | 45 |
137-
138- - The HMI reads ** sensor_num** and ** sensor_val** from the incoming packet, then updates the local display or logs the data.
139-
140-
141- ## Subsystem error code
142-
143- | | Byte 1 | Byte 2 |
144- | --------------| -------------| ------------|
145- | ** Variable** | msg_type | err_code |
146- | ** Type** | uint8_t | uint8_t |
147- | ** Example** | 4 | 1 |
148-
149- - The HMI displays or records an appropriate message (e.g., "Error Code 1: Overload").
150-
151- ## Subsystem error message
152-
153- | | Byte 1 | Bytes 2–58 |
154- | --------------| -------------| --------------------|
155- | ** Variable** | msg_type | err_msg |
156- | ** Type** | uint8_t | char array (uint8_t) |
157- | ** Min Value** | 5 | char[ 1] |
158- | ** Max Value** | 5 | char[ 57] (null-terminated) |
159- | ** Example** | 5 | "sensor 1 read error" |
160-
161- - The HMI might display ** "sensor 1 read error"** on a local screen or beep to alert the user.
162-
163- ### Team Send Addresses:
164-
165- Aarshon HMI :
166-
167-
168-
169-
170-
171-
0 commit comments