Skip to content

Commit

Permalink
Added global build flag to all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
SRGDamia1 committed Nov 27, 2018
1 parent 9b1ba32 commit 7c1cba6
Show file tree
Hide file tree
Showing 24 changed files with 105 additions and 36 deletions.
40 changes: 30 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,36 @@ matrix:
install: npm install -g jsonlint
script: jsonlint -q library.json

- env: PLATFORMIO_CI_SRC=examples/single_sensor/
- env: PLATFORMIO_CI_SRC=examples/multisensor_print/
- env: PLATFORMIO_CI_SRC=examples/simple_logging/
- env: PLATFORMIO_CI_SRC=examples/logging_to_EnviroDIY/
- env: PLATFORMIO_CI_SRC=examples/DRWI_CitSci/
- env: PLATFORMIO_CI_SRC=examples/DRWI_NoCellular/
- env: PLATFORMIO_CI_SRC=examples/double_logger/
- env: PLATFORMIO_CI_SRC=examples/baro_rho_correction/
- env: PLATFORMIO_CI_SRC=examples/data_saving/
- env:
- PLATFORMIO_CI_SRC=examples/single_sensor/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/multisensor_print/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/simple_logging/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/logging_to_EnviroDIY/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/DRWI_CitSci/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/DRWI_NoCellular/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/double_logger/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/baro_rho_correction/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
- env:
- PLATFORMIO_CI_SRC=examples/data_saving/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"

- env: PLATFORMIO_CI_SRC=examples/logging_to_EnviroDIY_Zero/
- env:
- PLATFORMIO_CI_SRC=examples/logging_to_EnviroDIY_Zero/
- PLATFORMIO_BUILD_FLAGS="-D SDI12_EXTERNAL_PCINT"
script:
- platformio ci -v --project-option="lib_ignore = SoftwareSerial_ExtInts, AltSoftSerial, SoftI2CMaster" --project-option="lib_ldf_mode = deep+" --board=adafruit_feather_m0
2 changes: 1 addition & 1 deletion examples/DRWI_CitSci/DRWI_CitSci.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data to an SD card and sending the data to
both the EnviroDIY data portal and Stroud's custom data portal as should be
Expand Down
7 changes: 6 additions & 1 deletion examples/DRWI_CitSci/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
2 changes: 1 addition & 1 deletion examples/DRWI_NoCellular/DRWI_NoCellular.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data from a Decagon CTD-10 and a Campbell
OBS 3+ to an SD card.
Expand Down
7 changes: 6 additions & 1 deletion examples/DRWI_NoCellular/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
2 changes: 1 addition & 1 deletion examples/baro_rho_correction/baro_rho_correction.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data to an SD card and sending the data to
the EnviroDIY data portal.
Expand Down
7 changes: 6 additions & 1 deletion examples/baro_rho_correction/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
2 changes: 1 addition & 1 deletion examples/data_saving/data_saving.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data to an SD card and sending only a
portion of that data to the EnviroDIY data portal.
Expand Down
7 changes: 6 additions & 1 deletion examples/data_saving/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
https://github.com/PaulStoffregen/AltSoftSerial.git
2 changes: 1 addition & 1 deletion examples/double_logger/double_logger.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data from different variables at two
different logging intervals. This example uses more of the manual functions
Expand Down
7 changes: 6 additions & 1 deletion examples/double_logger/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
2 changes: 1 addition & 1 deletion examples/logging_to_EnviroDIY/logging_to_EnviroDIY.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data to an SD card and sending the data to
the EnviroDIY data portal.
Expand Down
7 changes: 6 additions & 1 deletion examples/logging_to_EnviroDIY/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
https://github.com/PaulStoffregen/AltSoftSerial.git
https://github.com/EnviroDIY/SoftwaterSerial_ExternalInts.git
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data to an SD card and sending the data to
the EnviroDIY data portal via a AtSAMD21 board, such as an Arduino Zero or Feather M0.
Expand Down
7 changes: 6 additions & 1 deletion examples/logging_to_EnviroDIY_Zero/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ platform = atmelsam
framework = arduino
lib_ldf_mode = deep+
lib_ignore = SoftwareSerial_ExtInts, AltSoftSerial
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
RTCZero
2 changes: 1 addition & 1 deletion examples/multisensor_print/multisensor_print.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of printing data from multiple sensors using
the modular sensor library.
Expand Down
7 changes: 6 additions & 1 deletion examples/multisensor_print/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
https://github.com/PaulStoffregen/AltSoftSerial.git
https://github.com/EnviroDIY/SoftwaterSerial_ExternalInts.git
7 changes: 6 additions & 1 deletion examples/simple_logging/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
https://github.com/PaulStoffregen/AltSoftSerial.git
https://github.com/EnviroDIY/SoftwaterSerial_ExternalInts.git
2 changes: 1 addition & 1 deletion examples/simple_logging/simple_logging.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of logging data to an SD card
Expand Down
7 changes: 6 additions & 1 deletion examples/single_sensor/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ platform = atmelavr
framework = arduino
lib_ldf_mode = deep+
lib_ignore = RTCZero
build_flags =
-DSDI12_EXTERNAL_PCINT
lib_deps =
EnviroDIY_ModularSensors@=0.17.1
EnviroDIY_ModularSensors@=0.17.2
; ^^ Use this when working from an official release of the library
; https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when if you want to pull from the develop branch
https://github.com/EnviroDIY/SoftwaterSerial_ExternalInts.git
2 changes: 1 addition & 1 deletion examples/single_sensor/single_sensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Software License: BSD-3.
Copyright (c) 2017, Stroud Water Research Center (SWRC)
and the EnviroDIY Development Team
This example sketch is written for ModularSensors library version 0.17.1
This example sketch is written for ModularSensors library version 0.17.2
This sketch is an example of getting data from a single sensor, in this case, a
MaxBotix Ultrasonic Range Finder
Expand Down
1 change: 0 additions & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"+<sensors/*.cpp>",
"+<sensors/*.h>"
],
"extraScript": "pioScripts/pio_set_global_flags.py",
"libLDFMode": "deep+"
},
"dependencies":
Expand Down
8 changes: 4 additions & 4 deletions pioScripts/pio_set_global_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
("SDI12_EXTERNAL_PCINT",)
]
)
print ">>>>>LOCAL ENV<<<<<"
print env.Dump()
# print ">>>>>LOCAL ENV<<<<<"
# print env.Dump()

# append the same flags to the global build environment (for all libraries, etc)
global_env = DefaultEnvironment()
Expand All @@ -19,5 +19,5 @@
("SDI12_EXTERNAL_PCINT",)
]
)
print "<<<<<GLOBAL ENV>>>>>"
print global_env.Dump()
# print "<<<<<GLOBAL ENV>>>>>"
# print global_env.Dump()
2 changes: 1 addition & 1 deletion src/ModSensorDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <Arduino.h>

// The current library version number
#define MODULAR_SENSORS_VERSION "0.17.1"
#define MODULAR_SENSORS_VERSION "0.17.2"

#ifndef STANDARD_SERIAL_OUTPUT
#if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)
Expand Down

1 comment on commit 7c1cba6

@SRGDamia1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra script is pending platformio/platformio-core#1941

Please sign in to comment.