Skip to content

Commit

Permalink
MySensors 2.3.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
tekka007 committed Dec 9, 2019
2 parents f4fd69e + 3e2c542 commit b9d9cc3
Show file tree
Hide file tree
Showing 274 changed files with 8,194 additions and 5,963 deletions.
20 changes: 12 additions & 8 deletions .ci/arduino.groovy
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!groovy
def buildArduino(config, String buildFlags, String sketch, String key) {
def root = '/opt/arduino-1.8.7/'
def root = '/opt/arduino-1.8.9/'
def build_path = 'build'
def build_path_cmd = ' -build-path '+build_path+' '
if (config.nightly_arduino_ide)
{
root = '/opt/arduino-nightly/'
// patch for nightly arduino-builder
}
//def esp8266_tools = '/opt/arduino-nightly/hardware/esp8266com/esp8266/tools'
def jenkins_root = '/var/lib/jenkins/'
def builder = root+'arduino-builder'
def standard_args = ' -warnings=all' //-verbose=true
Expand All @@ -14,9 +16,11 @@ def buildArduino(config, String buildFlags, String sketch, String key) {
def jenkins_packages = jenkins_root+'.arduino15/packages'
def site_specifics = ' -hardware '+jenkins_packages+' -tools '+jenkins_packages
def repo_specifics = ' -hardware hardware -libraries . '
def build_cmd = builder+standard_args+builder_specifics+site_specifics+repo_specifics+buildFlags
def build_cmd = builder+standard_args+builder_specifics+site_specifics+repo_specifics+build_path_cmd+buildFlags
sh """#!/bin/bash
printf "\\e[1m\\e[32mBuilding \\e[34m${sketch} \\e[0musing \\e[1m\\e[36m${build_cmd}\\e[0m\\n"
if [ -d ${build_path} ]; then rm -r ${build_path}; fi
mkdir ${build_path}
${build_cmd} ${sketch} 2>> compiler_${key}.log"""
}

Expand All @@ -25,9 +29,9 @@ def parseWarnings(String key) {
defaultEncoding: '',
excludePattern: '''.*/EEPROM\\.h,.*/Dns\\.cpp,.*/socket\\.cpp,.*/util\\.h,.*/Servo\\.cpp,
.*/Adafruit_NeoPixel\\.cpp,.*/UIPEthernet.*,.*/SoftwareSerial\\.cpp,
.*/pins_arduino\\.h,.*/Stream\\.cpp,.*/USBCore\\.cpp,.*/Wire\\.cpp,
.*/hardware/STM32F1.*,.*/hardware/esp8266.*,.*/hardware/espressif/esp32.*,
.*/libraries/SD/.*''',
.*/pins_arduino\\.h,.*/Stream\\.cpp,.*/USBCore\\.cpp,.*/libraries/Wire/.*,
.*/hardware/STM32F1.*,.*/hardware/esp8266.*,.*/hardware/esp32.*,
.*/libraries/SD/.*,.*/libraries/Ethernet/.*''',

healthy: '', includePattern: '', messagesPattern: '',
parserConfigurations: [[parserName: 'Arduino/AVR', pattern: 'compiler_'+key+'.log']],
Expand Down Expand Up @@ -215,7 +219,7 @@ def buildSTM32F1(config, sketches, String key) {
}

def buildESP8266(config, sketches, String key) {
def fqbn = '-fqbn=esp8266:esp8266:generic:CpuFrequency=80,VTable=flash,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=qio,FlashSize=512K0,led=2,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,FlashErase=none,UploadSpeed=115200'
def fqbn = '-fqbn=esp8266:esp8266:generic:xtal=80,vt=flash,exception=disabled,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=512K,led=2,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200'
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (ESP8266 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
try {
for (sketch = 0; sketch < sketches.size(); sketch++) {
Expand Down Expand Up @@ -255,7 +259,7 @@ def buildESP8266(config, sketches, String key) {
}

def buildESP32(config, sketches, String key) {
def fqbn = '-fqbn espressif:esp32:esp32:PartitionScheme=default,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -warnings=default'
def fqbn = '-fqbn esp32:esp32:esp32:PartitionScheme=default,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -warnings=default'
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (ESP32 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
try {
for (sketch = 0; sketch < sketches.size(); sketch++) {
Expand Down
44 changes: 37 additions & 7 deletions .ci/butler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ cd ..

result=0

echo "No subjects are of invalid size<br>" > too_long_subjects.txt
echo "No subjects with leading lower case characters<br>" > leading_lowercases.txt
echo "No subjects with trailing periods<br>" > trailing_periods.txt
echo "No body lines are too wide<br>" > too_long_body_lines.txt
echo "No keywords are missing in keywords.txt<br>" > missing_keywords.txt
echo "No occurences of the deprecated boolean data type<br>" >> booleans.txt
echo "No subjects are of invalid size - great!<br>" > too_long_subjects.txt
echo "No subjects with leading lower case characters - great!<br>" > leading_lowercases.txt
echo "No subjects with trailing periods - great!<br>" > trailing_periods.txt
echo "No body lines are too wide - great!<br>" > too_long_body_lines.txt
echo "No keywords are missing in keywords.txt - great!<br>" > missing_keywords.txt
echo "No keywords in code that don't exist in keywords.txt - great!<br>" > missing_keywords_2.txt
echo "No keywords in code that don't have Doxygen comments and aren't blacklisted in keywords.txt - great!<br>" > missing_keywords_3.txt
echo "No lines in keywords.txt using spaces instead of TAB (the Arduino IDE doesn't support space) - great!<br>" > tab_spaces_keywords.txt
echo "No occurences of the deprecated boolean data type - great!<br>" >> booleans.txt

too_long_subjects=`awk 'length > 72' subjects.txt`
if [ -n "$too_long_subjects" ]; then
Expand Down Expand Up @@ -49,6 +52,33 @@ if [ -n "$missing_keywords" ]; then
result=1
fi

missing_keywords_2=$(SOURCE_FILES="core/ drivers/ hal/ examples/ examples_linux/ MyConfig.h MySensors.h"; for keyword in $(grep -whore 'MY_[A-Z][A-Z_0-9]*' $SOURCE_FILES | sort -u ); do grep -q $keyword keywords.txt || echo $keyword; done)
if [ -n "$missing_keywords_2" ]; then
echo "<b>Keywords in code that don't exist in keywords.txt:</b>" > missing_keywords_2.txt
echo "If keywords aren't in keywords.txt, they will not be highlighted in the Arduino IDE. Highlighting makes the code easier to follow and helps spot spelling mistakes." > missing_keywords_2.txt
echo "$missing_keywords_2" >> missing_keywords_2.txt
sed -i -e 's/$/<br>/' missing_keywords_2.txt
result=1
fi
missing_keywords_3=$(SOURCE_FILES="core/ drivers/ hal/ examples/ examples_linux/ MyConfig.h MySensors.h"; for keyword in $(grep -whore 'MY_[A-Z][A-Z_0-9]*' $SOURCE_FILES | sort -u ); do grep -q $keyword keywords.txt || echo $keyword; done)
if [ -n "$missing_keywords_3" ]; then
echo "<b>Keywords in code that don't have Doxygen comments and aren't blacklisted in keywords.txt:</b>" > missing_keywords_3.txt
echo "If keywords don't have Doxygen comments, they will not be available at https://www.mysensors.org/apidocs/index.html Add Doxygen comments to make it easier for users to find and understand how to use the new keywords." > missing_keywords_3.txt
echo "$missing_keywords_3" >> missing_keywords_3.txt
sed -i -e 's/$/<br>/' missing_keywords_3.txt
result=1
fi
tab_spaces_keywords=$(grep -e '[[:space:]]KEYWORD' -e '[[:space:]]LITERAL1' keywords.txt | grep -v -e $'\tLITERAL1' -e $'\tKEYWORD')
if [ -n "$tab_spaces_keywords" ]; then
echo "<b>Keywords that use space instead of TAB in keywords.txt:</b>" > tab_spaces_keywords.txt
echo "$tab_spaces_keywords" >> tab_spaces_keywords.txt
sed -i -e 's/$/<br>/' tab_spaces_keywords.txt
result=1
fi
# Evaluate if there exists booleans in the code tree (not counting this file)
if git grep -q boolean -- `git ls-files | grep -v butler.sh`; then
echo "<b>You have added at least one occurence of the deprecated boolean data type. Please use bool instead.</b><br>" > booleans.txt
Expand All @@ -57,7 +87,7 @@ fi
printf "%s" "<html>" > butler.html
echo "Greetings! Here is my evaluation of your pull request:<br>" >> butler.html
awk 'FNR==1{print "<br>"}1' too_long_subjects.txt leading_lowercases.txt trailing_periods.txt too_long_body_lines.txt missing_keywords.txt booleans.txt >> butler.html
awk 'FNR==1{print "<br>"}1' too_long_subjects.txt leading_lowercases.txt trailing_periods.txt too_long_body_lines.txt missing_keywords.txt missing_keywords_2.txt missing_keywords_3.txt tab_spaces_keywords.txt booleans.txt >> butler.html
echo "<br>" >> butler.html
if [ $result -ne 0 ]; then
echo "<b>I am afraid there are some issues with your commit messages and/or use of keywords.</b><br>" >> butler.html
Expand Down
2 changes: 1 addition & 1 deletion .ci/doxygen.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def call(config) {
Documentation/doxygen.sh"""
warnings canComputeNew: false, canResolveRelativePaths: false,
defaultEncoding: '',
excludePattern: '''.*/sha204_library\\.h,.*/drivers/Linux/.*,.*/drivers/TinyGSM/.*,.*/cores/esp8266/.*,hardware/.*''',
excludePattern: '''.*/hal/architecture/Linux/drivers/.*,.*/hal/architecture/AVR/drivers/.*,.*/drivers/TinyGSM/.*''',
failedTotalAll: '', healthy: '', includePattern: '', messagesPattern: '',
parserConfigurations: [[parserName: 'Doxygen', pattern: config.repository_root+'doxygen.log']],
unHealthy: '', unstableTotalAll: '0'
Expand Down
2 changes: 1 addition & 1 deletion .ci/static_analysis.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def cppCheck(config) {
sh """#!/bin/bash +x
cd ${config.repository_root}
echo "Doing cppcheck for AVR..."
find . -type f \\( -iname \\*.c -o -iname \\*.cpp -o -iname \\*.ino \\) | cppcheck -j 4 --force --file-list=- --enable=style,information --platform=.mystools/cppcheck/config/avr.xml --suppressions-list=.mystools/cppcheck/config/suppressions.cfg --includes-file=.mystools/cppcheck/config/includes.cfg --language=c++ --inline-suppr --xml --xml-version=2 2> cppcheck-avr.xml
find . -type f \\( -iname \\*.c -o -iname \\*.cpp -o -iname \\*.ino \\) | cppcheck -j 4 --force --file-list=- --enable=style,portability,performance --platform=.mystools/cppcheck/config/avr.xml --suppressions-list=.mystools/cppcheck/config/suppressions.cfg --includes-file=.mystools/cppcheck/config/includes.cfg --language=c++ --inline-suppr --xml --xml-version=2 2> cppcheck-avr.xml
cppcheck-htmlreport --file="cppcheck-avr.xml" --title="cppcheck-avr" --report-dir=cppcheck-avr_cppcheck_reports --source-dir=."""

publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true,
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://www.mysensors.org/hall-of-fame
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ bin
.idea
doxygen.log
TAGS
tags
tags
.DS_Store
42 changes: 23 additions & 19 deletions .mystools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

This directory hosts MySensors development tools. The following
conventions are employed to facilitate consistent re-use/invocation
across modalitiies (e.g. local development, continuous integration,
across modalities (e.g. local development, continuous integration,
editor linters, etc.)

1. All common tools are hosted and managed in
1. All common tools are hosted and managed in
the tools directory (used for both local development
and continuous integration)
2. Each tool comprises a directory, akin to a bundle,
that encapsulates declarative command-line options,
configuration files and a run script
3. A single bootstrap script configures a
development environment
4. A lightweight runtime provides a common set of
4. A lightweight runtime provides a common set of
convenience functions and variables to all scripts
5. Support for all MySensors development environments

Expand Down Expand Up @@ -92,7 +92,7 @@ One or more required tools not found. Install required tools and re-run .mystoo

To finish the bootstrap process, you will need to install the required
tools for your specific operating system as follows. Currently we use
Astyle 2.0.5 or later and Cppcheck 1.76 or later. Once you have
Astyle 3.1 or later and Cppcheck 1.88 or later. Once you have
installed AStyle and Cppcheck, re-run bootstrap-dev.sh to finish
configuring your development environment.

Expand All @@ -106,7 +106,18 @@ configuring your development environment.

#### Linux Trusty or earlier

##### Note: The apt versions are too old on Trusty so follow the [Linux - Build and Install from Source](#buildFromSource) instructions
Note: The apt versions are too old on Trusty so follow the [Linux - Build and Install from Source](#buildFromSource) instructions

##### Windows - WSL
Tested with Ubuntu 18-04 LTS and 19.04
```
apt-get install astyle
git clone https://github.com/danmar/cppcheck.git
cd cppcheck/
git checkout 1.89 # or later version if available
mkdir build && cd build && cmake .. && cmake --build .
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
```

##### Windows - GitHub Git Shell

Expand Down Expand Up @@ -142,13 +153,9 @@ iwr 'http://github.com/danmar/cppcheck/releases/download/1.76.1/cppcheck-1.76.1-
### At this point you need to reboot for the path changes to take effect
```

##### Windows - bash

###### NOTE: At the time of this writing, the apt vresions of cppcheck and astyle are too old. Follow the [Linux - Build and Install from Source](#buildFromSource) instructions

##### Windows - Cygwin
```
Run Either Cygwin Setup-x86-64.exe or Setup-x86.exe depending upon your OS. Select and install astyle and cppcheck
Run Either Cygwin Setup-x86-64.exe or Setup-x86.exe depending upon your OS. Select and install astyle and cppcheck
```

##### <a name="buildFromSource"></a>Linux - Build and Install from Source
Expand All @@ -163,15 +170,12 @@ curl -L 'https://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/as
cd astyle/build/gcc && sudo make shared release shared static install
### Install Cppcheck
# Download
curl -L 'https://sourceforge.net/projects/cppcheck/files/cppcheck/1.76.1/cppcheck-1.76.1.tar.gz/download' | tar xvz
# Compile and install
cd cppcheck-1.76.1
sudo apt-get install libpcre++-dev
sudo make SRCDIR=build CFGDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
```
git clone https://github.com/danmar/cppcheck.git
cd cppcheck/
git checkout 1.89 # or later version if available)
mkdir build && cd build && cmake .. && cmake --build .
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
```
### Implementation Details
Expand Down
9 changes: 5 additions & 4 deletions .mystools/bootstrap-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ check_tool_prerequisite()
function ver { printf "%03d%03d%03d%03d" $(echo "$1" | tr '.' ' '); }

if is_installed ${1} ; then
#local version=$(${1} --version 2>&1 | sed -e 's/[[:alpha:]|(|[:space:]]//g')
local version=$(${1} --version 2>&1 | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p')
local version=$(${1} --version 2>&1 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
if [ $(ver ${version}) -lt $(ver ${2}) ]; then
warn "Found ${1} ${version} however, version ${2} or greater is required..."
return 1
else
log "Found ${1} ${version}"
fi
else
warn "${1} not installed or not in current path."
Expand Down Expand Up @@ -73,8 +74,8 @@ check_git_remote "upstream" "${mysrepo}" || {

#3
log "Checking tool/utility prerequisites..."
check_tool_prerequisite "astyle" "2.0.5" || err "Install AStyle 2.0.5 or greater and re-run ${0}"
check_tool_prerequisite "cppcheck" "1.76" || err "Install Cppcheck 1.76 or greater and re-run ${0}"
check_tool_prerequisite "astyle" "3.1" || err "Install AStyle 3.1 or greater and re-run ${0}"
check_tool_prerequisite "cppcheck" "1.88" || err "Install Cppcheck 1.88 or greater and re-run ${0}"
check_tool_prerequisite "git" "2.0" || err "Install git 2.0 or greater and re-run ${0}"

#4
Expand Down
5 changes: 0 additions & 5 deletions .mystools/cppcheck/config/includes.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
.
drivers/Linux
drivers/AES
drivers/BCM
core
10 changes: 6 additions & 4 deletions .mystools/cppcheck/config/suppressions.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ConfigurationNotChecked
unmatchedSuppression
// This suppression is because the problem is in an in-lined macro so in-line-suppressions does not appear to take effect
unreadVariable:*/MyHwNRF5.cpp
// inline suppression doesn't work
*:hal/architecture/NRF5/drivers/Flash.cpp
*:hal/transport/RFM69/driver/old/RFM69_old.cpp
// 3rd party
*:hal/architecture/Linux/*
*:drivers/*
17 changes: 0 additions & 17 deletions .mystools/cppcheck/config/unix32.xml

This file was deleted.

18 changes: 9 additions & 9 deletions .mystools/cppcheck/options.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash

OPTIONS="--quiet \
--error-exitcode=1 \
--force \
--enable=style,information \
-DCPPCHECK \
--language=c++ \
--library=${LIBRARY:-avr} \
--platform="${TOOLCONFIG}"/${PLATFORM:-avr.xml} \
OPTIONS="--quiet \
--error-exitcode=1 \
--force \
--enable=style,portability,performance \
-DCPPCHECK \
--language=c++ \
--library=${LIBRARY:-avr} \
--platform="${TOOLCONFIG}"/${PLATFORM:-avr.xml} \
--includes-file="${TOOLCONFIG}"/includes.cfg \
--inline-suppr \
--inline-suppr \
--suppressions-list="${TOOLCONFIG}"/suppressions.cfg"

echo $OPTIONS
2 changes: 1 addition & 1 deletion Documentation/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Are you a sketch developer/user, see @ref publics

Are you a core/library developer, see @ref internals

@copyright (C) 2013-2018 Sensnology AB
@copyright (C) 2013-2019 Sensnology AB

Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
*/
Expand Down
Binary file modified Documentation/plantuml.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion Documentation/styles/html/footerFile.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
Copyright (C) 2013-2018 Sensnology AB. $generatedby <a href="http://www.doxygen.org/index.html">doxygen</a>
Copyright (C) 2013-2019 Sensnology AB. $generatedby <a href="http://www.doxygen.org/index.html">doxygen</a>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
Expand Down
Loading

0 comments on commit b9d9cc3

Please sign in to comment.