-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
610e104
commit d7ceb85
Showing
28 changed files
with
500 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,18 @@ jobs: | |
CATKIN_WS: /home/runner/work/catkin_ws | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/package.xml') }}-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('**/package.xml') }}-${{ hashFiles('**/requirements.txt') }} | ||
- name: Cache apt | ||
uses: actions/cache@v2 | ||
with: | ||
path: /var/cache/apt/archives | ||
key: ${{ runner.os }}-apt-${{ github.run_id }} | ||
restore-keys: ${{ runner.os }}-apt-${{ github.run_id }} | ||
- name: Setup ROS | ||
uses: ros-tooling/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,47 +9,53 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
target_project: | ||
- enr_dps310_interface | ||
- enr_message_board | ||
- enr_stickv2_interface | ||
- m5atoms3_sesami_client | ||
- m5atoms3_switchbot_client | ||
- sample_aes_cmac | ||
- sample_esp_now_broadcaster | ||
- sample_esp_now_receiver | ||
- sample_sesami | ||
- sample_uwb | ||
- sdp_debug_board | ||
- sdp_elevator_status_broadcaster | ||
- sdp_example | ||
- sdp_landmark_information | ||
- sdp_sesami_host | ||
- sdp_stickv2_interface | ||
- smart_device_protocol_interface | ||
env: | ||
CATKIN_WS: /home/runner/work/catkin_ws | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup ROS | ||
uses: ros-tooling/[email protected] | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
required-ros-distributions: noetic | ||
- name: Install catkin tool | ||
run: sudo apt-get install python3-catkin-tools | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.txt') }} | ||
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.txt') }} | ||
- name: Cache PlatformIO global ${{ matrix.target_project }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.platformio | ||
key: ${{ runner.os }}-platformio-global-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
restore-keys: ${{ runner.os }}-platformio-global-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
- name: Cache PlatformIO local ${{ matrix.target_project }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ github.workspace }}/sketchbooks/${{ matrix.target_project }}/.pio | ||
key: ${{ runner.os }}-platformio-local-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
restore-keys: ${{ runner.os }}-platformio-local-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
- name: Update pip and install pip package | ||
run: | | ||
pip3 install pip --upgrade | ||
pip3 install pyopenssl --upgrade | ||
pip3 install platformio | ||
- name: Init workspace | ||
run: | | ||
source /opt/ros/noetic/setup.bash | ||
mkdir -p ${CATKIN_WS}/src | ||
ln -s ${GITHUB_WORKSPACE} ${CATKIN_WS}/src/ | ||
- name: pre build | ||
run: | | ||
source /opt/ros/noetic/setup.bash | ||
rosdep update | ||
rosdep install -i -y --from-paths ./ | ||
- name: build | ||
run: | | ||
source /opt/ros/noetic/setup.bash | ||
cd ${CATKIN_WS} | ||
catkin build | ||
- name: Update ros_lib | ||
run: | | ||
source ${CATKIN_WS}/devel/setup.bash | ||
rm -rf $(rospack find esp_now_ros)/ros_lib | ||
rosrun rosserial_arduino make_libraries.py $(rospack find esp_now_ros)/ros_lib | ||
- name: build sketches esp_now_ros | ||
- name: build sketch ${{ matrix.target_project }} | ||
run: | | ||
source ${CATKIN_WS}/devel/setup.bash | ||
find $(rospack find esp_now_ros)/sketchbooks -maxdepth 1 -type d | while read dir; do | ||
if [ "$dir" != "$(rospack find esp_now_ros)/sketchbooks" ]; then | ||
echo "Building $dir" | ||
pio run -d $dir | ||
fi | ||
done | ||
pio run -d ${{ github.workspace }}/sketchbooks/${{ matrix.target_project }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Cakin Build and PlatformIO Build Workflow | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
target_project: | ||
- enr_dps310_interface | ||
- enr_message_board | ||
- enr_stickv2_interface | ||
- m5atoms3_sesami_client | ||
- m5atoms3_switchbot_client | ||
- sample_aes_cmac | ||
- sample_esp_now_broadcaster | ||
- sample_esp_now_receiver | ||
- sample_sesami | ||
- sample_uwb | ||
- sdp_debug_board | ||
- sdp_elevator_status_broadcaster | ||
- sdp_example | ||
- sdp_landmark_information | ||
- sdp_sesami_host | ||
- sdp_stickv2_interface | ||
- smart_device_protocol_interface | ||
env: | ||
CATKIN_WS: /home/runner/work/catkin_ws | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.txt') }} | ||
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.txt') }} | ||
- name: Cache apt | ||
uses: actions/cache@v2 | ||
with: | ||
path: /var/cache/apt/archives | ||
key: ${{ runner.os }}-apt-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }} | ||
restore-keys: ${{ runner.os }}-apt-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }} | ||
- name: Cache PlatformIO global ${{ matrix.target_project }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.platformio | ||
key: ${{ runner.os }}-platformio-global-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
restore-keys: ${{ runner.os }}-platformio-global-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
- name: Cache PlatformIO local ${{ matrix.target_project }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ github.workspace }}/sketchbooks/${{ matrix.target_project }}/.pio | ||
key: ${{ runner.os }}-platformio-local-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
restore-keys: ${{ runner.os }}-platformio-local-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }} | ||
- name: Setup ROS | ||
uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: noetic | ||
- name: Install catkin tool | ||
run: sudo apt-get install python3-catkin-tools | ||
- name: Update pip and install pip package | ||
run: | | ||
pip3 install pip --upgrade | ||
pip3 install pyopenssl --upgrade | ||
pip3 install platformio | ||
- name: Init workspace | ||
run: | | ||
source /opt/ros/noetic/setup.bash | ||
mkdir -p ${CATKIN_WS}/src | ||
ln -s ${{ github.workspace }} ${CATKIN_WS}/src/ | ||
- name: pre build | ||
run: | | ||
source /opt/ros/noetic/setup.bash | ||
rosdep update | ||
rosdep install -i -y --from-paths ./ | ||
- name: catkin build | ||
run: | | ||
source /opt/ros/noetic/setup.bash | ||
cd ${CATKIN_WS} | ||
catkin build | ||
- name: Update ros_lib | ||
run: | | ||
source ${CATKIN_WS}/devel/setup.bash | ||
rm -rf ${{ github.workspace }}/ros_lib | ||
rosrun rosserial_arduino make_libraries.py ${{ github.workspace }}/ros_lib | ||
- name: build sketch ${{ matrix.target_project }} | ||
run: | | ||
pio run -d ${{ github.workspace }}/sketchbooks/${{ matrix.target_project }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <esp_system.h> | ||
#include <esp_now.h> | ||
#include <WiFi.h> | ||
|
||
#include <esp_now_ros/Packet.h> | ||
|
||
bool init_esp_now(uint8_t *mac_address, esp_now_recv_cb_t callback_receive) | ||
{ | ||
// Read device mac address | ||
esp_read_mac(mac_address, ESP_MAC_WIFI_STA); | ||
|
||
WiFi.mode(WIFI_STA); | ||
WiFi.disconnect(); | ||
if (esp_now_init() != ESP_OK) | ||
{ | ||
return false; | ||
} | ||
if (callback_receive != NULL) | ||
{ | ||
esp_now_register_recv_cb(callback_receive); | ||
} | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.