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:
@@ -96,8 +96,8 @@ typedef struct _alox_EspNowUnicastTestResponse {
|
||||
uint32_t seq;
|
||||
} alox_EspNowUnicastTestResponse;
|
||||
|
||||
/* 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. */
|
||||
typedef struct _alox_LedRingProgressRequest {
|
||||
uint32_t mode;
|
||||
/* * 0–100: fraction of ring LEDs to light (mode=progress) */
|
||||
@@ -107,8 +107,12 @@ typedef struct _alox_LedRingProgressRequest {
|
||||
uint32_t r;
|
||||
uint32_t g;
|
||||
uint32_t b;
|
||||
/* * 0–255 brightness scale applied to r/g/b */
|
||||
/* * 0–255 brightness scale; 0 = firmware default (~5 %) */
|
||||
uint32_t intensity;
|
||||
/* * Pulse length in ms (mode=blink, default 350) */
|
||||
uint32_t blink_ms;
|
||||
/* * Number of pulses (mode=blink, default 1) */
|
||||
uint32_t blink_count;
|
||||
} alox_LedRingProgressRequest;
|
||||
|
||||
typedef struct _alox_LedRingProgressResponse {
|
||||
@@ -237,7 +241,7 @@ extern "C" {
|
||||
#define alox_AccelDeadzoneResponse_init_default {0, 0, 0, 0}
|
||||
#define alox_EspNowUnicastTestRequest_init_default {0, 0}
|
||||
#define alox_EspNowUnicastTestResponse_init_default {0, 0}
|
||||
#define alox_LedRingProgressRequest_init_default {0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_LedRingProgressRequest_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_LedRingProgressResponse_init_default {0, 0, 0, 0}
|
||||
#define alox_OtaStartPayload_init_default {0}
|
||||
#define alox_OtaPayload_init_default {0, {0, {0}}}
|
||||
@@ -258,7 +262,7 @@ extern "C" {
|
||||
#define alox_AccelDeadzoneResponse_init_zero {0, 0, 0, 0}
|
||||
#define alox_EspNowUnicastTestRequest_init_zero {0, 0}
|
||||
#define alox_EspNowUnicastTestResponse_init_zero {0, 0}
|
||||
#define alox_LedRingProgressRequest_init_zero {0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_LedRingProgressRequest_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_LedRingProgressResponse_init_zero {0, 0, 0, 0}
|
||||
#define alox_OtaStartPayload_init_zero {0}
|
||||
#define alox_OtaPayload_init_zero {0, {0, {0}}}
|
||||
@@ -305,6 +309,8 @@ extern "C" {
|
||||
#define alox_LedRingProgressRequest_g_tag 5
|
||||
#define alox_LedRingProgressRequest_b_tag 6
|
||||
#define alox_LedRingProgressRequest_intensity_tag 7
|
||||
#define alox_LedRingProgressRequest_blink_ms_tag 8
|
||||
#define alox_LedRingProgressRequest_blink_count_tag 9
|
||||
#define alox_LedRingProgressResponse_success_tag 1
|
||||
#define alox_LedRingProgressResponse_mode_tag 2
|
||||
#define alox_LedRingProgressResponse_progress_tag 3
|
||||
@@ -469,7 +475,9 @@ X(a, STATIC, SINGULAR, UINT32, digit, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, r, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, g, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, b, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, intensity, 7)
|
||||
X(a, STATIC, SINGULAR, UINT32, intensity, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, blink_ms, 8) \
|
||||
X(a, STATIC, SINGULAR, UINT32, blink_count, 9)
|
||||
#define alox_LedRingProgressRequest_CALLBACK NULL
|
||||
#define alox_LedRingProgressRequest_DEFAULT NULL
|
||||
|
||||
@@ -588,7 +596,7 @@ extern const pb_msgdesc_t alox_OtaSlaveProgressResponse_msg;
|
||||
#define alox_ClientInput_size 22
|
||||
#define alox_EspNowUnicastTestRequest_size 12
|
||||
#define alox_EspNowUnicastTestResponse_size 8
|
||||
#define alox_LedRingProgressRequest_size 42
|
||||
#define alox_LedRingProgressRequest_size 54
|
||||
#define alox_LedRingProgressResponse_size 20
|
||||
#define alox_OtaEndPayload_size 0
|
||||
#define alox_OtaPayload_size 209
|
||||
|
||||
@@ -110,8 +110,8 @@ message EspNowUnicastTestResponse {
|
||||
uint32 seq = 2;
|
||||
}
|
||||
|
||||
// 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.
|
||||
message LedRingProgressRequest {
|
||||
uint32 mode = 1;
|
||||
/** 0–100: fraction of ring LEDs to light (mode=progress) */
|
||||
@@ -121,8 +121,12 @@ message LedRingProgressRequest {
|
||||
uint32 r = 4;
|
||||
uint32 g = 5;
|
||||
uint32 b = 6;
|
||||
/** 0–255 brightness scale applied to r/g/b */
|
||||
/** 0–255 brightness scale; 0 = firmware default (~5 %) */
|
||||
uint32 intensity = 7;
|
||||
/** Pulse length in ms (mode=blink, default 350) */
|
||||
uint32 blink_ms = 8;
|
||||
/** Number of pulses (mode=blink, default 1) */
|
||||
uint32 blink_count = 9;
|
||||
}
|
||||
|
||||
message LedRingProgressResponse {
|
||||
|
||||
Reference in New Issue
Block a user