Skip to content

Commit b9d9cc3

Browse files
committed
MySensors 2.3.2 release
2 parents f4fd69e + 3e2c542 commit b9d9cc3

File tree

274 files changed

+8194
-5963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+8194
-5963
lines changed

.ci/arduino.groovy

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#!groovy
22
def buildArduino(config, String buildFlags, String sketch, String key) {
3-
def root = '/opt/arduino-1.8.7/'
3+
def root = '/opt/arduino-1.8.9/'
4+
def build_path = 'build'
5+
def build_path_cmd = ' -build-path '+build_path+' '
46
if (config.nightly_arduino_ide)
57
{
68
root = '/opt/arduino-nightly/'
9+
// patch for nightly arduino-builder
710
}
8-
//def esp8266_tools = '/opt/arduino-nightly/hardware/esp8266com/esp8266/tools'
911
def jenkins_root = '/var/lib/jenkins/'
1012
def builder = root+'arduino-builder'
1113
def standard_args = ' -warnings=all' //-verbose=true
@@ -14,9 +16,11 @@ def buildArduino(config, String buildFlags, String sketch, String key) {
1416
def jenkins_packages = jenkins_root+'.arduino15/packages'
1517
def site_specifics = ' -hardware '+jenkins_packages+' -tools '+jenkins_packages
1618
def repo_specifics = ' -hardware hardware -libraries . '
17-
def build_cmd = builder+standard_args+builder_specifics+site_specifics+repo_specifics+buildFlags
19+
def build_cmd = builder+standard_args+builder_specifics+site_specifics+repo_specifics+build_path_cmd+buildFlags
1820
sh """#!/bin/bash
1921
printf "\\e[1m\\e[32mBuilding \\e[34m${sketch} \\e[0musing \\e[1m\\e[36m${build_cmd}\\e[0m\\n"
22+
if [ -d ${build_path} ]; then rm -r ${build_path}; fi
23+
mkdir ${build_path}
2024
${build_cmd} ${sketch} 2>> compiler_${key}.log"""
2125
}
2226

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

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

217221
def buildESP8266(config, sketches, String key) {
218-
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'
222+
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'
219223
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (ESP8266 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
220224
try {
221225
for (sketch = 0; sketch < sketches.size(); sketch++) {
@@ -255,7 +259,7 @@ def buildESP8266(config, sketches, String key) {
255259
}
256260

257261
def buildESP32(config, sketches, String key) {
258-
def fqbn = '-fqbn espressif:esp32:esp32:PartitionScheme=default,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -warnings=default'
262+
def fqbn = '-fqbn esp32:esp32:esp32:PartitionScheme=default,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -warnings=default'
259263
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (ESP32 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
260264
try {
261265
for (sketch = 0; sketch < sketches.size(); sketch++) {

.ci/butler.sh

+37-7
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ cd ..
44

55
result=0
66

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

1417
too_long_subjects=`awk 'length > 72' subjects.txt`
1518
if [ -n "$too_long_subjects" ]; then
@@ -49,6 +52,33 @@ if [ -n "$missing_keywords" ]; then
4952
result=1
5053
fi
5154

55+
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)
56+
if [ -n "$missing_keywords_2" ]; then
57+
echo "<b>Keywords in code that don't exist in keywords.txt:</b>" > missing_keywords_2.txt
58+
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
59+
echo "$missing_keywords_2" >> missing_keywords_2.txt
60+
sed -i -e 's/$/<br>/' missing_keywords_2.txt
61+
result=1
62+
fi
63+
64+
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)
65+
if [ -n "$missing_keywords_3" ]; then
66+
echo "<b>Keywords in code that don't have Doxygen comments and aren't blacklisted in keywords.txt:</b>" > missing_keywords_3.txt
67+
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
68+
echo "$missing_keywords_3" >> missing_keywords_3.txt
69+
sed -i -e 's/$/<br>/' missing_keywords_3.txt
70+
result=1
71+
fi
72+
73+
74+
tab_spaces_keywords=$(grep -e '[[:space:]]KEYWORD' -e '[[:space:]]LITERAL1' keywords.txt | grep -v -e $'\tLITERAL1' -e $'\tKEYWORD')
75+
if [ -n "$tab_spaces_keywords" ]; then
76+
echo "<b>Keywords that use space instead of TAB in keywords.txt:</b>" > tab_spaces_keywords.txt
77+
echo "$tab_spaces_keywords" >> tab_spaces_keywords.txt
78+
sed -i -e 's/$/<br>/' tab_spaces_keywords.txt
79+
result=1
80+
fi
81+
5282
# Evaluate if there exists booleans in the code tree (not counting this file)
5383
if git grep -q boolean -- `git ls-files | grep -v butler.sh`; then
5484
echo "<b>You have added at least one occurence of the deprecated boolean data type. Please use bool instead.</b><br>" > booleans.txt
@@ -57,7 +87,7 @@ fi
5787
5888
printf "%s" "<html>" > butler.html
5989
echo "Greetings! Here is my evaluation of your pull request:<br>" >> butler.html
60-
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
90+
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
6191
echo "<br>" >> butler.html
6292
if [ $result -ne 0 ]; then
6393
echo "<b>I am afraid there are some issues with your commit messages and/or use of keywords.</b><br>" >> butler.html

.ci/doxygen.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def call(config) {
66
Documentation/doxygen.sh"""
77
warnings canComputeNew: false, canResolveRelativePaths: false,
88
defaultEncoding: '',
9-
excludePattern: '''.*/sha204_library\\.h,.*/drivers/Linux/.*,.*/drivers/TinyGSM/.*,.*/cores/esp8266/.*,hardware/.*''',
9+
excludePattern: '''.*/hal/architecture/Linux/drivers/.*,.*/hal/architecture/AVR/drivers/.*,.*/drivers/TinyGSM/.*''',
1010
failedTotalAll: '', healthy: '', includePattern: '', messagesPattern: '',
1111
parserConfigurations: [[parserName: 'Doxygen', pattern: config.repository_root+'doxygen.log']],
1212
unHealthy: '', unstableTotalAll: '0'

.ci/static_analysis.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def cppCheck(config) {
55
sh """#!/bin/bash +x
66
cd ${config.repository_root}
77
echo "Doing cppcheck for AVR..."
8-
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
8+
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
99
cppcheck-htmlreport --file="cppcheck-avr.xml" --title="cppcheck-avr" --report-dir=cppcheck-avr_cppcheck_reports --source-dir=."""
1010

1111
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true,

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://www.mysensors.org/hall-of-fame

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ bin
1111
.idea
1212
doxygen.log
1313
TAGS
14-
tags
14+
tags
15+
.DS_Store

.mystools/README.md

+23-19
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

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

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

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

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

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

107107
#### Linux Trusty or earlier
108108

109-
##### Note: The apt versions are too old on Trusty so follow the [Linux - Build and Install from Source](#buildFromSource) instructions
109+
Note: The apt versions are too old on Trusty so follow the [Linux - Build and Install from Source](#buildFromSource) instructions
110+
111+
##### Windows - WSL
112+
Tested with Ubuntu 18-04 LTS and 19.04
113+
```
114+
apt-get install astyle
115+
git clone https://github.com/danmar/cppcheck.git
116+
cd cppcheck/
117+
git checkout 1.89 # or later version if available
118+
mkdir build && cd build && cmake .. && cmake --build .
119+
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
120+
```
110121

111122
##### Windows - GitHub Git Shell
112123

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

145-
##### Windows - bash
146-
147-
###### 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
148-
149156
##### Windows - Cygwin
150157
```
151-
Run Either Cygwin Setup-x86-64.exe or Setup-x86.exe depending upon your OS. Select and install astyle and cppcheck
158+
Run Either Cygwin Setup-x86-64.exe or Setup-x86.exe depending upon your OS. Select and install astyle and cppcheck
152159
```
153160

154161
##### <a name="buildFromSource"></a>Linux - Build and Install from Source
@@ -163,15 +170,12 @@ curl -L 'https://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/as
163170
cd astyle/build/gcc && sudo make shared release shared static install
164171
165172
### Install Cppcheck
166-
167-
# Download
168-
curl -L 'https://sourceforge.net/projects/cppcheck/files/cppcheck/1.76.1/cppcheck-1.76.1.tar.gz/download' | tar xvz
169-
170-
# Compile and install
171-
cd cppcheck-1.76.1
172-
sudo apt-get install libpcre++-dev
173-
sudo make SRCDIR=build CFGDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
174-
173+
```
174+
git clone https://github.com/danmar/cppcheck.git
175+
cd cppcheck/
176+
git checkout 1.89 # or later version if available)
177+
mkdir build && cd build && cmake .. && cmake --build .
178+
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
175179
```
176180
177181
### Implementation Details

.mystools/bootstrap-dev.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ check_tool_prerequisite()
1818
function ver { printf "%03d%03d%03d%03d" $(echo "$1" | tr '.' ' '); }
1919

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

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

8081
#4
-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
.
2-
drivers/Linux
3-
drivers/AES
4-
drivers/BCM
5-
core
+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
ConfigurationNotChecked
2-
unmatchedSuppression
3-
// This suppression is because the problem is in an in-lined macro so in-line-suppressions does not appear to take effect
4-
unreadVariable:*/MyHwNRF5.cpp
1+
// inline suppression doesn't work
2+
*:hal/architecture/NRF5/drivers/Flash.cpp
3+
*:hal/transport/RFM69/driver/old/RFM69_old.cpp
4+
// 3rd party
5+
*:hal/architecture/Linux/*
6+
*:drivers/*

.mystools/cppcheck/config/unix32.xml

-17
This file was deleted.

.mystools/cppcheck/options.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash
22

3-
OPTIONS="--quiet \
4-
--error-exitcode=1 \
5-
--force \
6-
--enable=style,information \
7-
-DCPPCHECK \
8-
--language=c++ \
9-
--library=${LIBRARY:-avr} \
10-
--platform="${TOOLCONFIG}"/${PLATFORM:-avr.xml} \
3+
OPTIONS="--quiet \
4+
--error-exitcode=1 \
5+
--force \
6+
--enable=style,portability,performance \
7+
-DCPPCHECK \
8+
--language=c++ \
9+
--library=${LIBRARY:-avr} \
10+
--platform="${TOOLCONFIG}"/${PLATFORM:-avr.xml} \
1111
--includes-file="${TOOLCONFIG}"/includes.cfg \
12-
--inline-suppr \
12+
--inline-suppr \
1313
--suppressions-list="${TOOLCONFIG}"/suppressions.cfg"
1414

1515
echo $OPTIONS

Documentation/mainpage.dox

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Are you a sketch developer/user, see @ref publics
55

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

8-
@copyright (C) 2013-2018 Sensnology AB
8+
@copyright (C) 2013-2019 Sensnology AB
99

1010
Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*/

Documentation/plantuml.jar

-1.6 MB
Binary file not shown.

Documentation/styles/html/footerFile.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<!--END GENERATE_TREEVIEW-->
1313
<!--BEGIN !GENERATE_TREEVIEW-->
1414
<hr class="footer"/><address class="footer"><small>
15-
Copyright (C) 2013-2018 Sensnology AB. $generatedby <a href="http://www.doxygen.org/index.html">doxygen</a>
15+
Copyright (C) 2013-2019 Sensnology AB. $generatedby <a href="http://www.doxygen.org/index.html">doxygen</a>
1616
</a> $doxygenversion
1717
</small></address>
1818
<!--END !GENERATE_TREEVIEW-->

0 commit comments

Comments
 (0)