diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..be2a2cbb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,36 @@ +sudo: false + +language: bash + +os: + - linux + +before_install: + - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" + +before_script: + - "export DISPLAY=:99.0" + - sleep 3 # give xvfb some time to start + - wget http://downloads.arduino.cc/arduino-1.8.5-linux64.tar.xz + - tar xf arduino-1.8.5-linux64.tar.xz + - mv arduino-1.8.5 $HOME/arduino_ide + - cd $HOME/arduino_ide/hardware + - mkdir esp32 + - cd esp32 + - git clone https://github.com/espressif/arduino-esp32.git esp32 + - cd esp32/tools + - python get.py + - cd .. + - echo 'build.flash_freq=40m' >> platform.txt + +script: + - cd $TRAVIS_BUILD_DIR + - source command.sh + - export PATH="$HOME/arduino_ide:$PATH" + - arduino --board esp32:esp32:esp32 --save-prefs + - build_sketch $TRAVIS_BUILD_DIR/Grbl_Esp32/Grbl_Esp32.ino + +notifications: + email: + on_success: change + on_failure: change diff --git a/Grbl_Esp32/grbl_sd.cpp b/Grbl_Esp32/grbl_sd.cpp index 3a1aaf3e..2e5f28b9 100644 --- a/Grbl_Esp32/grbl_sd.cpp +++ b/Grbl_Esp32/grbl_sd.cpp @@ -28,7 +28,7 @@ File myFile; -char fileTypes[FILE_TYPE_COUNT][8] = {".NC", ".TXT", ".GCODE"}; // filter out files not of these types (s/b UPPERCASE) +char fileTypes[FILE_TYPE_COUNT][8] = {".NC", ".TXT", ".GCODE", ".TAP", ".NGC"}; // filter out files not of these types (s/b UPPERCASE) bool SD_ready_next = false; // Grbl has processed a line and is waiting for another diff --git a/Grbl_Esp32/grbl_sd.h b/Grbl_Esp32/grbl_sd.h index 2ebec755..c24942d7 100644 --- a/Grbl_Esp32/grbl_sd.h +++ b/Grbl_Esp32/grbl_sd.h @@ -22,7 +22,7 @@ #include "SD.h" #include "SPI.h" -#define FILE_TYPE_COUNT 3 // number of acceptable gcode file types in array +#define FILE_TYPE_COUNT 5 // number of acceptable gcode file types in array #define SDCARD_DET_PIN -1 #define SDCARD_DET_VAL 0 diff --git a/README.md b/README.md index 7a3beda3..211cfd97 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ ### Project Overview +[![Build Status](https://travis-ci.org/bdring/Grbl_Esp32.svg?branch=WebUI)](https://travis-ci.org/bdring/Grbl_Esp32) + This is a port of [Grbl](https://github.com/gnea/grbl) for the ESP32. The ESP32 is potentially a great target for Grbl for the following reasons - **Faster** - Faster step rates and additional features could be added diff --git a/command.sh b/command.sh new file mode 100644 index 00000000..e366f20e --- /dev/null +++ b/command.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +function build_sketch() +{ + local sketch=$1 + + # buld sketch with arudino ide + echo -e "\n Build $sketch \n" + arduino --verbose --verify $sketch + + # get build result from arduino + local re=$? + + # check result + if [ $re -ne 0 ]; then + echo "Failed to build $sketch" + return $re + fi +}