fix compiler warnings. fix bug where drive dist was not properly capped.
This commit is contained in:
@@ -211,8 +211,10 @@ void control_task(void *param) {
|
||||
continue;
|
||||
}
|
||||
this_move_dist = MIN(get_param_value_t(PARAM_DRIVE_DIST).f32, remaining_distance);
|
||||
goto do_start;
|
||||
case FSM_CMD_START_IGNORE_OVERTRAVEL:
|
||||
this_move_dist = get_param_value_t(PARAM_DRIVE_DIST).f32;
|
||||
do_start:
|
||||
if (current_state == STATE_IDLE) {
|
||||
|
||||
if (get_battery_V() < get_param_value_t(PARAM_LOW_PROTECTION_V).f32) {
|
||||
|
||||
@@ -145,15 +145,6 @@ static void rf_433_receiver_task(void* param) {
|
||||
ESP_LOGI(TAG, "LEARNED KEYCODE (temp storage)");
|
||||
learn_flag = -1;
|
||||
} else if (controls_enabled) {
|
||||
// Only process RF commands if controls are enabled
|
||||
rf_code_t rf_msg = {
|
||||
.code = code,
|
||||
.high_avg = high / 24,
|
||||
.low_avg = low / 24,
|
||||
.errors = err,
|
||||
.num_symbols = len
|
||||
};
|
||||
|
||||
for (uint8_t i = 0; i < NUM_RF_BUTTONS; i++) {
|
||||
uint32_t match = get_param_value_t(PARAM_KEYCODE_0+i).u32;
|
||||
// Compare just the code (lower 32 bits)
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -171,7 +171,7 @@ esp_err_t commit_params(void);
|
||||
|
||||
// Logging functions
|
||||
esp_err_t log_init(void);
|
||||
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);
|
||||
uint32_t log_get_head(void);
|
||||
uint32_t log_get_tail(void);
|
||||
uint32_t log_get_offset(void);
|
||||
@@ -188,5 +188,5 @@ esp_err_t log_read(uint8_t* len, uint8_t* buf, uint8_t* type);
|
||||
esp_err_t log_erase_all_sectors(void);
|
||||
esp_err_t log_simulate_power_cycle(void);
|
||||
void log_read_reset(void);
|
||||
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);
|
||||
#endif // STORAGE_H
|
||||
@@ -62,7 +62,7 @@ static void cmd_post(char *json_data) {
|
||||
|
||||
// Call the unified POST handler
|
||||
cJSON *response = NULL;
|
||||
esp_err_t err = comms_handle_post(request, &response);
|
||||
(void)comms_handle_post(request, &response);
|
||||
cJSON_Delete(request);
|
||||
|
||||
if (response == NULL) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
const unsigned char PROGMEM html_content_gz[] = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x18, 0x55, 0xb3, 0x69, 0x02, 0xff, 0xed, 0x3d, 0xfb, 0x5b, 0xdb, 0x48,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x58, 0x6d, 0xb3, 0x69, 0x02, 0xff, 0xed, 0x3d, 0xfb, 0x5b, 0xdb, 0x48,
|
||||
0x92, 0x3f, 0xef, 0xfc, 0x15, 0x0d, 0x93, 0x21, 0x52, 0x10, 0xb2, 0x0d, 0x64, 0x66, 0xd6, 0x46,
|
||||
0x66, 0x09, 0x38, 0x3b, 0x4c, 0x12, 0xe0, 0xc3, 0x90, 0xcc, 0x1c, 0xc7, 0x87, 0x64, 0xab, 0x8d,
|
||||
0x35, 0xc8, 0x92, 0x57, 0x92, 0x21, 0x5e, 0xe3, 0xff, 0xfd, 0xaa, 0xfa, 0x21, 0xb5, 0x1e, 0x36,
|
||||
|
||||
Reference in New Issue
Block a user