You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Firmware/LowLevel/src/ui_board.h
+34-1Lines changed: 34 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,9 @@ enum TYPE
25
25
Get_Version=0xB0,
26
26
Set_Buzzer=0xB1,
27
27
Set_LEDs=0xB2,
28
-
Get_Button=0xB3
28
+
Get_Button=0xB3,
29
+
Get_Emergency=0xB4, // Stock-CoverUI
30
+
Get_Rain=0xB5// Stock-CoverUI
29
31
};
30
32
31
33
@@ -59,6 +61,16 @@ enum LED_state {
59
61
LED_on=0b111
60
62
};
61
63
64
+
// Stock-CoverUI (same bitmask as in ll_status.emergency_bitmask of datatypes.h)
65
+
enumEmergency_state
66
+
{
67
+
Emergency_latch=0b00001,
68
+
Emergency_stop1=0b00010,
69
+
Emergency_stop2=0b00100,
70
+
Emergency_lift1=0b01000,
71
+
Emergency_lift2=0b10000
72
+
};
73
+
62
74
#pragma pack(push, 1)
63
75
structmsg_get_version
64
76
{
@@ -114,6 +126,27 @@ struct msg_event_button
114
126
} __attribute__((packed));
115
127
#pragma pack(pop)
116
128
129
+
// Stock-CoverUI
130
+
#pragma pack(push, 1)
131
+
structmsg_event_rain
132
+
{
133
+
uint8_ttype; // Command type
134
+
uint8_treserved; // Padding
135
+
uint32_tvalue;
136
+
uint32_tthreshold; // If value < threshold then it rains. Why a threshold? Cause there might be a future option to make it configurable on Stock-CoverUI
137
+
uint16_tcrc; // CRC 16
138
+
} __attribute__((packed));
139
+
#pragma pack(pop)
140
+
141
+
// Stock-CoverUI
142
+
#pragma pack(push, 1)
143
+
structmsg_event_emergency
144
+
{
145
+
uint8_ttype; // Command type
146
+
uint8_tstate; // Same as in ll_status.emergency_bitmask of datatypes.h
0 commit comments