Dim LED ring, add blink mode, and signal OTA outcome on the ring.
Default brightness is ~5%; UART blink mode and green/red pulses mark OTA success or failure. Failed UART uploads skip ESP-NOW distribution. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1068,8 +1068,8 @@ func (x *EspNowUnicastTestResponse) GetSeq() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Host → device: LED ring display (progress bar, digit, or clear).
|
||||
// mode: 0=clear, 1=progress (0–100 %), 2=digit (0–10, same layout as firmware digit maps).
|
||||
// Host → device: LED ring display (progress bar, digit, clear, or blink).
|
||||
// mode: 0=clear, 1=progress (0–100 %), 2=digit (0–10), 3=blink full ring.
|
||||
type LedRingProgressRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Mode uint32 `protobuf:"varint,1,opt,name=mode,proto3" json:"mode,omitempty"`
|
||||
@@ -1080,8 +1080,12 @@ type LedRingProgressRequest struct {
|
||||
R uint32 `protobuf:"varint,4,opt,name=r,proto3" json:"r,omitempty"`
|
||||
G uint32 `protobuf:"varint,5,opt,name=g,proto3" json:"g,omitempty"`
|
||||
B uint32 `protobuf:"varint,6,opt,name=b,proto3" json:"b,omitempty"`
|
||||
// * 0–255 brightness scale applied to r/g/b
|
||||
Intensity uint32 `protobuf:"varint,7,opt,name=intensity,proto3" json:"intensity,omitempty"`
|
||||
// * 0–255 brightness scale; 0 = firmware default (~5 %)
|
||||
Intensity uint32 `protobuf:"varint,7,opt,name=intensity,proto3" json:"intensity,omitempty"`
|
||||
// * Pulse length in ms (mode=blink, default 350)
|
||||
BlinkMs uint32 `protobuf:"varint,8,opt,name=blink_ms,json=blinkMs,proto3" json:"blink_ms,omitempty"`
|
||||
// * Number of pulses (mode=blink, default 1)
|
||||
BlinkCount uint32 `protobuf:"varint,9,opt,name=blink_count,json=blinkCount,proto3" json:"blink_count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -1165,6 +1169,20 @@ func (x *LedRingProgressRequest) GetIntensity() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LedRingProgressRequest) GetBlinkMs() uint32 {
|
||||
if x != nil {
|
||||
return x.BlinkMs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LedRingProgressRequest) GetBlinkCount() uint32 {
|
||||
if x != nil {
|
||||
return x.BlinkCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type LedRingProgressResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||
@@ -1707,7 +1725,7 @@ const file_uart_messages_proto_rawDesc = "" +
|
||||
"\x03seq\x18\x02 \x01(\rR\x03seq\"G\n" +
|
||||
"\x19EspNowUnicastTestResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x10\n" +
|
||||
"\x03seq\x18\x02 \x01(\rR\x03seq\"\xa6\x01\n" +
|
||||
"\x03seq\x18\x02 \x01(\rR\x03seq\"\xe2\x01\n" +
|
||||
"\x16LedRingProgressRequest\x12\x12\n" +
|
||||
"\x04mode\x18\x01 \x01(\rR\x04mode\x12\x1a\n" +
|
||||
"\bprogress\x18\x02 \x01(\rR\bprogress\x12\x14\n" +
|
||||
@@ -1715,7 +1733,10 @@ const file_uart_messages_proto_rawDesc = "" +
|
||||
"\x01r\x18\x04 \x01(\rR\x01r\x12\f\n" +
|
||||
"\x01g\x18\x05 \x01(\rR\x01g\x12\f\n" +
|
||||
"\x01b\x18\x06 \x01(\rR\x01b\x12\x1c\n" +
|
||||
"\tintensity\x18\a \x01(\rR\tintensity\"y\n" +
|
||||
"\tintensity\x18\a \x01(\rR\tintensity\x12\x19\n" +
|
||||
"\bblink_ms\x18\b \x01(\rR\ablinkMs\x12\x1f\n" +
|
||||
"\vblink_count\x18\t \x01(\rR\n" +
|
||||
"blinkCount\"y\n" +
|
||||
"\x17LedRingProgressResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x12\n" +
|
||||
"\x04mode\x18\x02 \x01(\rR\x04mode\x12\x1a\n" +
|
||||
|
||||
Reference in New Issue
Block a user