Skip to content

Commit

Permalink
Now compiles with current ESP-IDF (functionality unknown)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-random committed Dec 19, 2024
1 parent 4a67d59 commit 61c03a9
Show file tree
Hide file tree
Showing 10 changed files with 3,441 additions and 13 deletions.
3 changes: 3 additions & 0 deletions esp32_sawppy/.vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
6 changes: 5 additions & 1 deletion esp32_sawppy/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"files.associations": {
"cmath": "cpp",
"joy_adc.h": "c"
"joy_adc.h": "c",
"gpio_assignments.h": "c",
"joy_msg.h": "c",
"joy_rmt_rc.h": "c",
"volt_adc.h": "c"
}
}
2 changes: 1 addition & 1 deletion esp32_sawppy/lib/hardware/volt_adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static const adc1_channel_t voltage_channel = ADC1_GPIO35_CHANNEL;
static const adc_bits_width_t voltage_precision = ADC_WIDTH_BIT_12;

// No ADC input attenuation
static const adc_atten_t voltage_attenuation = ADC_ATTEN_0db;
static const adc_atten_t voltage_attenuation = ADC_ATTEN_DB_0;

// Conversion coefficient calculated with help of Fluke multimeter and ESP32
// dev module. Will vary between different ESP32 modules and actual resistance
Expand Down
6 changes: 3 additions & 3 deletions esp32_sawppy/lib/messages/msg_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void joy_msg_print_task(void* pvParameter)
{
if (pdTRUE == xQueuePeek(xJoystickQueue, &message, portMAX_DELAY))
{
ESP_LOGI(TAG_JOY, "%d | steer %+.2f | speed %+.2f | button %d",
ESP_LOGI(TAG_JOY, "%lu | steer %+.2f | speed %+.2f | button %lu",
message.timeStamp,
message.axes[axis_steer],
message.axes[axis_speed],
Expand Down Expand Up @@ -79,7 +79,7 @@ void twist_msg_print_task(void* pvParameter)
{
if (pdTRUE == xQueuePeek(xTwistQueue, &message, portMAX_DELAY))
{
ESP_LOGI(TAG_TWIST, "%d | linear %+.2f,%+.2f,%+.2f | angular %+.2f,%+.2f,%+.2f",
ESP_LOGI(TAG_TWIST, "%lu | linear %+.2f,%+.2f,%+.2f | angular %+.2f,%+.2f,%+.2f",
message.timeStamp,
message.linear.x,
message.linear.y,
Expand Down Expand Up @@ -114,7 +114,7 @@ void wheel_msg_print_task(void* pvParameter)
{
if (pdTRUE == xQueuePeek(xWheelQueue, &message, portMAX_DELAY))
{
printf("wheel_msg %d",
printf("wheel_msg %lu",
message.timeStamp);
for (int wheel = 0; wheel < WHEEL_MSG_DATA_COUNT; wheel++)
{
Expand Down
4 changes: 2 additions & 2 deletions esp32_sawppy/lib/rover/joy_steer.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ SOFTWARE.
*/
typedef struct joy_steer_task_parameters
{
xQueueHandle xJoyMsgQueue;
xQueueHandle xCmdVelQueue;
QueueHandle_t xJoyMsgQueue;
QueueHandle_t xCmdVelQueue;
} joy_steer_task_parameters;

/*
Expand Down
4 changes: 2 additions & 2 deletions esp32_sawppy/lib/rover/wheel_ackermann.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ SOFTWARE.
*/
typedef struct wheel_ackermann_task_parameters
{
xQueueHandle xCmdVelQueue;
xQueueHandle xWheelQueue;
QueueHandle_t xCmdVelQueue;
QueueHandle_t xWheelQueue;
} wheel_ackermann_task_parameters;

/*
Expand Down
4 changes: 2 additions & 2 deletions esp32_sawppy/lib/wifi/http_file_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ static const TickType_t powerUpdatePeriod = pdMS_TO_TICKS(100);
*/
typedef struct http_file_server_task_parameters
{
xQueueHandle xJoystickQueue;
xQueueHandle xPowerQueue;
QueueHandle_t xJoystickQueue;
QueueHandle_t xPowerQueue;
} http_file_server_task_parameters;

/*
Expand Down
2 changes: 0 additions & 2 deletions esp32_sawppy/lib/wifi/softap_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base, int32_t e
{
if (event_id == WIFI_EVENT_AP_STACONNECTED) {
wifi_event_ap_staconnected_t* event = (wifi_event_ap_staconnected_t*) event_data;
ESP_LOGI(TAG, "station "MACSTR" join, AID=%d", MAC2STR(event->mac), event->aid);
} else if (event_id == WIFI_EVENT_AP_STADISCONNECTED) {
wifi_event_ap_stadisconnected_t* event = (wifi_event_ap_stadisconnected_t*) event_data;
ESP_LOGI(TAG, "station "MACSTR" leave, AID=%d", MAC2STR(event->mac), event->aid);
}
}

Expand Down
Loading

0 comments on commit 61c03a9

Please sign in to comment.