fix compiler warnings. fix bug where drive dist was not properly capped.

This commit is contained in:
Thaddeus Hughes
2026-03-12 21:18:32 -05:00
parent cdb3b11db1
commit 77548e7e9f
8 changed files with 14 additions and 20 deletions

View File

@@ -724,7 +724,7 @@ static inline void find_head_tail(int32_t num_sectors, int32_t *head, int32_t *t
// Replace log_write with this non-blocking version:
esp_err_t log_write(uint8_t* buf, uint8_t len, uint8_t type) {
esp_err_t log_write(const uint8_t* buf, uint8_t len, uint8_t type) {
if (!log_initialized || log_partition == NULL) {
ESP_LOGE(TAG, "Logging not initialized");
return ESP_FAIL;
@@ -761,7 +761,7 @@ esp_err_t log_write(uint8_t* buf, uint8_t len, uint8_t type) {
}
// The actual blocking write function (called by the task)
static esp_err_t log_write_blocking(uint8_t* buf, uint8_t len, uint8_t type) {
static esp_err_t log_write_blocking(const uint8_t* buf, uint8_t len, uint8_t type) {
if (!log_initialized || log_partition == NULL) {
ESP_LOGE(TAG, "Logging not initialized");
return ESP_FAIL;
@@ -1319,7 +1319,7 @@ esp_err_t log_simulate_power_cycle(void) {
return ESP_OK;
}
esp_err_t log_write_blocking_test(uint8_t* buf, uint8_t len, uint8_t type) {
esp_err_t log_write_blocking_test(const uint8_t* buf, uint8_t len, uint8_t type) {
// Check queue space - wait if nearly full
while (uxQueueSpacesAvailable(log_queue) < 2) {
vTaskDelay(pdMS_TO_TICKS(10));