Skip to content

Refactor directory structure #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ set(INCS "mros2/include"
"mros2/embeddedRTPS/thirdparty/lwip"
"mros2/embeddedRTPS/thirdparty/Micro-CDR/include"
"cmsis-esp32/include"
"include"
"custom_msgs"
"platform"
"workspace/custom_msgs"
${CMAKE_SOURCE_DIR}/main
)

Expand Down
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ git clone --recursive https://github.com/mROS-base/mros2-esp32.git
cd mros2-esp32
```
### Change WiFi SSID/Pass
Change ESP_WIFI_SSID and ESP_WIFI_PASS in ```/workspace/common/wifi/wifi.h```.
Change ESP_WIFI_SSID and ESP_WIFI_PASS in `platform/wifi/wifi.h`.

### Change IP address
Change IP address in ```/include/rtps/config.h```.
Change IP address in `platform/rtps/config.h`.

When using DHCP, it is also necessary to specify the IP address.
Flash the app and check the IP address from startup log.
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions workspace/common/wifi/wifi.c → platform/wifi/wifi.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* NOTE:
* This file is copied from esp-idf examples as the below, and modified for usage of mros2-esp32.
* https://github.com/espressif/esp-idf/blob/master/examples/wifi/getting_started/station/main/station_example_main.c
* Therefore, mROS-base org inherits the Public Domain (or CC0) LICENCE for this file from the original file.
*/

#include "wifi.h"

#include "freertos/FreeRTOS.h"
Expand Down
7 changes: 7 additions & 0 deletions workspace/common/wifi/wifi.h → platform/wifi/wifi.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* NOTE:
* This file is copied from esp-idf examples as the below, and modified for usage of mros2-esp32.
* https://github.com/espressif/esp-idf/blob/master/examples/wifi/getting_started/station/main/station_example_main.c
* Therefore, mROS-base org inherits the Public Domain (or CC0) LICENCE for this file from the original file.
*/

#include "esp_wifi_types.h"

#define ESP_WIFI_SSID "SSID"
Expand Down
2 changes: 1 addition & 1 deletion workspace/echoback_string/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../.. ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/echoreply_string/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/m5stack_sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/pub_float32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/pub_image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/pub_long_string_sub_crc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/pub_twist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/sub_pose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down
2 changes: 1 addition & 1 deletion workspace/sub_uint16/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS ../../ ../common)
set(EXTRA_COMPONENT_DIRS ../../ ../../platform)
add_compile_options(-w)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
Expand Down