Skip to content

Commit

Permalink
Merge pull request #11 from RCMgames/prerelease
Browse files Browse the repository at this point in the history
add github action to prevent merging code that doesn't compile into main.
  • Loading branch information
joshua-8 authored Mar 31, 2024
2 parents f525833 + dbf22ff commit 42380e8
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 9 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on:
push:

workflow_dispatch:

jobs:
CI-platformio:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v3
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: pio run
- uses: LouisBrunner/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: build
conclusion: ${{ job.status }}
output: |
{"summary":"code was compiled"}
13 changes: 10 additions & 3 deletions RCMv2/RCMv2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
// https://github.com/rcmgames/RCMv2
// for information about the electronics, see the link at the top of this page: https://github.com/RCMgames

// #define RCM_HARDWARE_VERSION 10 // uncomment if you have an RCMByte board
// to use ROS mode switch the platformio project environment to one of the environments that says ROS in the name
/**
uncomment one of the following lines depending on which hardware you have
*/
// leave all lines commented if you have a standard RCM board
// #define RCM_HARDWARE_VERSION 10 // RCM BYTE V1

/**
to use ROS mode switch the platformio project environment to one of the environments that says ROS in the name
*/

#include "rcm.h" //defines pins

Expand Down Expand Up @@ -67,7 +74,7 @@ void configWifi()
void ROSWifiSettings()
{
// SSID, password, IP, port (on a computer run: sudo docker run -it --rm --net=host microros/micro-ros-agent:iron udp4 --port 8888 )
set_microros_wifi_transports("router", "password", "10.38.54.221", 8888);
set_microros_wifi_transports("router", "password", "10.25.21.1", 8888);
nodeName = "rcm_robot";
// numSubscribers = 10; //change max number of subscribers
}
Expand Down
37 changes: 31 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

[platformio]
src_dir = RCMv2
default_envs = RCMesp32dev

[env:RCMesp32dev]
framework = arduino
platform = espressif32@6.5.0
platform = espressif32@6.6.0
board = esp32dev
build_flags = -DCORE_DEBUG_LEVEL=0
monitor_speed = 115200
Expand All @@ -24,7 +23,7 @@ lib_deps =

[env:RCMadafruit_qtpy_esp32s3_nopsram]
framework = arduino
platform = espressif32@6.5.0
platform = espressif32@6.6.0
board = adafruit_qtpy_esp32s3_nopsram
build_flags = -DCORE_DEBUG_LEVEL=0
monitor_speed = 115200
Expand All @@ -33,9 +32,20 @@ lib_deps =
joshua1024/ESP32_easy_wifi_data@^1.0.0
fastled/[email protected]

[env:RCMadafruit_qtpy_esp32s3_n4r2]
framework = arduino
platform = [email protected]
board = adafruit_qtpy_esp32s3_n4r2
build_flags = -DCORE_DEBUG_LEVEL=0
monitor_speed = 115200
lib_deps =
joshua1024/JMotor@~0.22.3
joshua1024/ESP32_easy_wifi_data@^1.0.0
fastled/[email protected]

[env:ROSesp32dev]
framework = arduino
platform = espressif32@6.5.0
platform = espressif32@6.6.0
board = esp32dev
monitor_speed = 115200
build_flags =
Expand All @@ -49,11 +59,26 @@ lib_deps =

[env:ROSadafruit_qtpy_esp32s3_nopsram]
framework = arduino
platform = espressif32@6.5.0
platform = espressif32@6.6.0
board = adafruit_qtpy_esp32s3_nopsram
monitor_speed = 115200
build_flags =
-L ./.pio/libdeps/adafruit_qtpy_esp32s3_nopsram/micro_ros_arduino/src/esp32/
-L ./.pio/libdeps/ROSadafruit_qtpy_esp32s3_nopsram/micro_ros_arduino/src/esp32/
-l microros
-DCORE_DEBUG_LEVEL=0
-DRCM_ROS=1
lib_deps =
joshua1024/JMotor@~0.22.3
fastled/[email protected]
https://github.com/micro-ROS/micro_ros_arduino#v2.0.7-iron

[env:ROSadafruit_qtpy_esp32s3_n4r2]
framework = arduino
platform = [email protected]
board = adafruit_qtpy_esp32s3_n4r2
monitor_speed = 115200
build_flags =
-L ./.pio/libdeps/ROSadafruit_qtpy_esp32s3_n4r2/micro_ros_arduino/src/esp32/
-l microros
-DCORE_DEBUG_LEVEL=0
-DRCM_ROS=1
Expand Down

0 comments on commit 42380e8

Please sign in to comment.