Add shake emotion with persistent state and calibration
Introduces a new shake emotion animation with a shake-stop transition, including embedded Lottie animation data and a state machine for emotion transitions. Adds a non-volatile storage (NVS) driver for persistent state management, including first-boot detection, boot count, and IMU calibration storage. Updates emotion manager and related headers to support new shake emotion states, and integrates new UI components for calibration and loading animations.
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include "esp_log.h"
|
||||
#include "ui/lottie_player.h"
|
||||
|
||||
|
||||
static const char *TAG = "blink_emotion";
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -61,15 +60,19 @@ void blinkEmotionPlay(void) {
|
||||
ESP_LOGE(TAG, "Failed to create blink player");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// If player already exists, resume playback and blink timer
|
||||
lottiePlay(blinkPlayer);
|
||||
lottieResumeNaturalBlink(blinkPlayer);
|
||||
}
|
||||
|
||||
// Lottie player auto-starts with natural blink mode
|
||||
ESP_LOGI(TAG, "Blink animation active");
|
||||
}
|
||||
|
||||
void blinkEmotionPause(void) {
|
||||
if (blinkPlayer != NULL) {
|
||||
lottiePause(blinkPlayer);
|
||||
lottiePauseNaturalBlink(blinkPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user