update: fixed shake animation

The shake animation figures have been fixed. However, the petting emotion working with touch remains an issue. The Lottie JSON for the emotion is unable not parsable for some reason and my next step is to fix that for tomorrow's meeting.
This commit is contained in:
2026-01-27 00:30:12 +05:30
parent 90031cd16e
commit 22bd5a6f70
13 changed files with 814 additions and 5 deletions

View File

@@ -40,6 +40,7 @@ static void touchInputCallback(lv_indev_drv_t *drv, lv_indev_data_t *data);
bool touchDriverInit(void) {
ESP_LOGI(TAG, "Initializing touch controller");
ESP_LOGI(TAG, "DEBUG: touchHandle before init: %p", (void*)touchHandle);
// Create I2C IO handle for touch controller
esp_lcd_panel_io_handle_t tpIoHandle = NULL;
@@ -50,6 +51,9 @@ bool touchDriverInit(void) {
(esp_lcd_i2c_bus_handle_t)I2C_MASTER_PORT, &tpIoConfig, &tpIoHandle);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to create touch panel IO: %s", esp_err_to_name(err));
ESP_LOGE(TAG, "DEBUG: touchHandle after I2C IO failure: %p", (void*)touchHandle);
// Ensure touchHandle is NULL on any initialization failure
touchHandle = NULL;
return false;
}
@@ -72,10 +76,16 @@ bool touchDriverInit(void) {
},
};
ESP_LOGI(TAG, "DEBUG: About to call esp_lcd_touch_new_i2c_ft5x06, current touchHandle: %p", (void*)touchHandle);
err = esp_lcd_touch_new_i2c_ft5x06(tpIoHandle, &touchConfig, &touchHandle);
ESP_LOGI(TAG, "DEBUG: esp_lcd_touch_new_i2c_ft5x06 returned err=%d, touchHandle=%p", err, (void*)touchHandle);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to initialize touch controller: %s",
esp_err_to_name(err));
ESP_LOGE(TAG, "DEBUG: touchHandle after FT5x06 init failure: %p", (void*)touchHandle);
// CRITICAL: Set touchHandle to NULL to prevent dangling pointer access
// The esp_lcd_touch_new_i2c_ft5x06 function may set touchHandle to a freed pointer on error
touchHandle = NULL;
return false;
}
@@ -87,6 +97,7 @@ bool touchDriverInit(void) {
lv_indev_drv_register(&inputDriver);
ESP_LOGI(TAG, "Touch controller initialized successfully");
ESP_LOGI(TAG, "DEBUG: Final touchHandle: %p", (void*)touchHandle);
return true;
}