Skip to content

Commit 6c4f068

Browse files
authored
Merge branch 'main' into add-spi-tft
2 parents b148f52 + 9a6a614 commit 6c4f068

20 files changed

+816
-44
lines changed

.clang-format

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
Language: Cpp
2+
# BasedOnStyle: LLVM
3+
AccessModifierOffset: -2
4+
AlignAfterOpenBracket: Align
5+
AlignArrayOfStructures: None
6+
AlignConsecutiveAssignments:
7+
Enabled: false
8+
AcrossEmptyLines: false
9+
AcrossComments: false
10+
AlignCompound: false
11+
AlignFunctionPointers: false
12+
PadOperators: true
13+
AlignConsecutiveBitFields:
14+
Enabled: false
15+
AcrossEmptyLines: false
16+
AcrossComments: false
17+
AlignCompound: false
18+
AlignFunctionPointers: false
19+
PadOperators: false
20+
AlignConsecutiveDeclarations:
21+
Enabled: false
22+
AcrossEmptyLines: false
23+
AcrossComments: false
24+
AlignCompound: false
25+
AlignFunctionPointers: false
26+
PadOperators: false
27+
AlignConsecutiveMacros:
28+
Enabled: false
29+
AcrossEmptyLines: false
30+
AcrossComments: false
31+
AlignCompound: false
32+
AlignFunctionPointers: false
33+
PadOperators: false
34+
AlignConsecutiveShortCaseStatements:
35+
Enabled: false
36+
AcrossEmptyLines: false
37+
AcrossComments: false
38+
AlignCaseColons: false
39+
AlignEscapedNewlines: Right
40+
AlignOperands: Align
41+
AlignTrailingComments:
42+
Kind: Always
43+
OverEmptyLines: 0
44+
AllowAllArgumentsOnNextLine: true
45+
AllowAllParametersOfDeclarationOnNextLine: true
46+
AllowBreakBeforeNoexceptSpecifier: Never
47+
AllowShortBlocksOnASingleLine: true
48+
AllowShortCaseLabelsOnASingleLine: false
49+
AllowShortCompoundRequirementOnASingleLine: true
50+
AllowShortEnumsOnASingleLine: true
51+
AllowShortFunctionsOnASingleLine: All
52+
AllowShortIfStatementsOnASingleLine: Never
53+
AllowShortLambdasOnASingleLine: All
54+
AllowShortLoopsOnASingleLine: false
55+
AlwaysBreakAfterDefinitionReturnType: None
56+
AlwaysBreakAfterReturnType: None
57+
AlwaysBreakBeforeMultilineStrings: false
58+
AlwaysBreakTemplateDeclarations: MultiLine
59+
AttributeMacros:
60+
- __capability
61+
BinPackArguments: true
62+
BinPackParameters: true
63+
BitFieldColonSpacing: Both
64+
BraceWrapping:
65+
AfterCaseLabel: false
66+
AfterClass: false
67+
AfterControlStatement: Never
68+
AfterEnum: false
69+
AfterExternBlock: false
70+
AfterFunction: false
71+
AfterNamespace: false
72+
AfterObjCDeclaration: false
73+
AfterStruct: false
74+
AfterUnion: false
75+
BeforeCatch: false
76+
BeforeElse: false
77+
BeforeLambdaBody: false
78+
BeforeWhile: false
79+
IndentBraces: false
80+
SplitEmptyFunction: true
81+
SplitEmptyRecord: true
82+
SplitEmptyNamespace: true
83+
BreakAdjacentStringLiterals: true
84+
BreakAfterAttributes: Leave
85+
BreakAfterJavaFieldAnnotations: false
86+
BreakArrays: true
87+
BreakBeforeBinaryOperators: None
88+
BreakBeforeConceptDeclarations: Always
89+
BreakBeforeBraces: Attach
90+
BreakBeforeInlineASMColon: OnlyMultiline
91+
BreakBeforeTernaryOperators: true
92+
BreakConstructorInitializers: BeforeColon
93+
BreakInheritanceList: BeforeColon
94+
BreakStringLiterals: true
95+
ColumnLimit: 80
96+
CommentPragmas: '^ IWYU pragma:'
97+
CompactNamespaces: false
98+
ConstructorInitializerIndentWidth: 4
99+
ContinuationIndentWidth: 4
100+
Cpp11BracedListStyle: true
101+
DerivePointerAlignment: false
102+
DisableFormat: false
103+
EmptyLineAfterAccessModifier: Never
104+
EmptyLineBeforeAccessModifier: LogicalBlock
105+
ExperimentalAutoDetectBinPacking: false
106+
FixNamespaceComments: true
107+
ForEachMacros:
108+
- foreach
109+
- Q_FOREACH
110+
- BOOST_FOREACH
111+
IfMacros:
112+
- KJ_IF_MAYBE
113+
IncludeBlocks: Preserve
114+
IncludeCategories:
115+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
116+
Priority: 2
117+
SortPriority: 0
118+
CaseSensitive: false
119+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
120+
Priority: 3
121+
SortPriority: 0
122+
CaseSensitive: false
123+
- Regex: '.*'
124+
Priority: 1
125+
SortPriority: 0
126+
CaseSensitive: false
127+
IncludeIsMainRegex: '(Test)?$'
128+
IncludeIsMainSourceRegex: ''
129+
IndentAccessModifiers: false
130+
IndentCaseBlocks: false
131+
IndentCaseLabels: false
132+
IndentExternBlock: AfterExternBlock
133+
IndentGotoLabels: true
134+
IndentPPDirectives: None
135+
IndentRequiresClause: true
136+
IndentWidth: 2
137+
IndentWrappedFunctionNames: false
138+
InsertBraces: false
139+
InsertNewlineAtEOF: false
140+
InsertTrailingCommas: None
141+
IntegerLiteralSeparator:
142+
Binary: 0
143+
BinaryMinDigits: 0
144+
Decimal: 0
145+
DecimalMinDigits: 0
146+
Hex: 0
147+
HexMinDigits: 0
148+
JavaScriptQuotes: Leave
149+
JavaScriptWrapImports: true
150+
KeepEmptyLinesAtTheStartOfBlocks: true
151+
KeepEmptyLinesAtEOF: false
152+
LambdaBodyIndentation: Signature
153+
LineEnding: DeriveLF
154+
MacroBlockBegin: ''
155+
MacroBlockEnd: ''
156+
MaxEmptyLinesToKeep: 1
157+
NamespaceIndentation: None
158+
ObjCBinPackProtocolList: Auto
159+
ObjCBlockIndentWidth: 2
160+
ObjCBreakBeforeNestedBlockParam: true
161+
ObjCSpaceAfterProperty: false
162+
ObjCSpaceBeforeProtocolList: true
163+
PackConstructorInitializers: BinPack
164+
PenaltyBreakAssignment: 2
165+
PenaltyBreakBeforeFirstCallParameter: 19
166+
PenaltyBreakComment: 300
167+
PenaltyBreakFirstLessLess: 120
168+
PenaltyBreakOpenParenthesis: 0
169+
PenaltyBreakScopeResolution: 500
170+
PenaltyBreakString: 1000
171+
PenaltyBreakTemplateDeclaration: 10
172+
PenaltyExcessCharacter: 1000000
173+
PenaltyIndentedWhitespace: 0
174+
PenaltyReturnTypeOnItsOwnLine: 60
175+
PointerAlignment: Right
176+
PPIndentWidth: -1
177+
QualifierAlignment: Leave
178+
ReferenceAlignment: Pointer
179+
ReflowComments: true
180+
RemoveBracesLLVM: false
181+
RemoveParentheses: Leave
182+
RemoveSemicolon: false
183+
RequiresClausePosition: OwnLine
184+
RequiresExpressionIndentation: OuterScope
185+
SeparateDefinitionBlocks: Leave
186+
ShortNamespaceLines: 1
187+
SkipMacroDefinitionBody: false
188+
SortIncludes: CaseSensitive
189+
SortJavaStaticImport: Before
190+
SortUsingDeclarations: LexicographicNumeric
191+
SpaceAfterCStyleCast: false
192+
SpaceAfterLogicalNot: false
193+
SpaceAfterTemplateKeyword: true
194+
SpaceAroundPointerQualifiers: Default
195+
SpaceBeforeAssignmentOperators: true
196+
SpaceBeforeCaseColon: false
197+
SpaceBeforeCpp11BracedList: false
198+
SpaceBeforeCtorInitializerColon: true
199+
SpaceBeforeInheritanceColon: true
200+
SpaceBeforeJsonColon: false
201+
SpaceBeforeParens: ControlStatements
202+
SpaceBeforeParensOptions:
203+
AfterControlStatements: true
204+
AfterForeachMacros: true
205+
AfterFunctionDefinitionName: false
206+
AfterFunctionDeclarationName: false
207+
AfterIfMacros: true
208+
AfterOverloadedOperator: false
209+
AfterPlacementOperator: true
210+
AfterRequiresInClause: false
211+
AfterRequiresInExpression: false
212+
BeforeNonEmptyParentheses: false
213+
SpaceBeforeRangeBasedForLoopColon: true
214+
SpaceBeforeSquareBrackets: false
215+
SpaceInEmptyBlock: false
216+
SpacesBeforeTrailingComments: 1
217+
SpacesInAngles: Never
218+
SpacesInContainerLiterals: true
219+
SpacesInLineCommentPrefix:
220+
Minimum: 1
221+
Maximum: -1
222+
SpacesInParens: Never
223+
SpacesInParensOptions:
224+
InCStyleCasts: false
225+
InConditionalStatements: false
226+
InEmptyParentheses: false
227+
Other: false
228+
SpacesInSquareBrackets: false
229+
Standard: Latest
230+
StatementAttributeLikeMacros:
231+
- Q_EMIT
232+
StatementMacros:
233+
- Q_UNUSED
234+
- QT_REQUIRE_VERSION
235+
TabWidth: 8
236+
UseTab: Never
237+
VerilogBreakBetweenInstancePorts: true
238+
WhitespaceSensitiveMacros:
239+
- BOOST_PP_STRINGIZE
240+
- CF_SWIFT_NAME
241+
- NS_SWIFT_NAME
242+
- PP_STRINGIZE
243+
- STRINGIZE

.github/workflows/build-clang-doxy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ jobs:
360360
[
361361
"wippersnapper_feather_esp32",
362362
"qtpy_esp32",
363+
"sparklemotion_esp32",
363364
"sparklemotionmini_esp32",
364365
"sparklemotionstick_esp32",
365366
"feather_esp32_v2",
@@ -648,6 +649,7 @@ jobs:
648649
# manually install OneWireNG/TempControlLib for OneWireNg (RP2040 Supported OneWire w/backwards compat.)
649650
- name: Install extra Arduino libraries
650651
run: |
652+
git clone --quiet https://github.com/adafruit/WiFiNINA.git /home/runner/Arduino/libraries/WiFiNINA
651653
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
652654
git clone --quiet https://github.com/pstolarz/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
653655
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name=Adafruit WipperSnapper
2-
version=1.0.0-beta.112
2+
version=1.0.0-beta.117
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Arduino application for Adafruit.io WipperSnapper
66
paragraph=Arduino application for Adafruit.io WipperSnapper
77
category=Communication
88
url=https://github.com/adafruit/Adafruit_Wippersnapper_Arduino
99
architectures=*
10-
depends=OmronD6T - Community Fork, SdFat - Adafruit Fork, Adafruit NeoPixel, Adafruit SPIFlash, ArduinoJson, Adafruit DotStar, Adafruit HDC302x, Adafruit INA219, Adafruit INA260 Library, Adafruit INA237 and INA238 Library, Adafruit LTR329 and LTR303, Adafruit LTR390 Library, Adafruit MCP3421, Adafruit NAU7802 Library, Adafruit SleepyDog Library, Adafruit TMP117, Adafruit TinyUSB Library, Adafruit AHTX0, Adafruit BME280 Library, Adafruit BMP280 Library, Adafruit BMP3XX Library, Adafruit DPS310, Adafruit DS248x, Adafruit SCD30, Adafruit SGP30 Sensor, Adafruit SGP40 Sensor, Sensirion I2C SCD4x, Sensirion I2C SEN5X, Sensirion I2C SEN66, arduino-sht, Adafruit Si7021 Library, Adafruit MQTT Library, Adafruit MS8607, Adafruit MCP9808 Library, Adafruit MCP9600 Library, Adafruit MPL115A2, Adafruit MPRLS Library, Adafruit TSL2591 Library, Adafruit_VL53L0X, Adafruit VL53L1X, STM32duino VL53L4CD, STM32duino VL53L4CX, Adafruit_VL6180X, Adafruit PM25 AQI Sensor, Adafruit VCNL4020 Library, Adafruit VCNL4040, Adafruit VCNL4200 Library, Adafruit VEML7700 Library, Adafruit LC709203F, Adafruit LPS2X, Adafruit LPS28, Adafruit LPS35HW, Adafruit seesaw Library, Adafruit BME680 Library, Adafruit MAX1704X, Adafruit ADT7410 Library, Adafruit HTS221, Adafruit HTU21DF Library, Adafruit HTU31D Library, Adafruit PCT2075, hp_BH1750, ENS160 - Adafruit Fork, Adafruit BusIO, Adafruit Unified Sensor, Sensirion Core, Adafruit GFX Library, Adafruit LED Backpack Library, Adafruit LiquidCrystal, Adafruit SH110X, Adafruit SSD1306, Adafruit EPD, Adafruit ST7735 and ST7789 Library, Adafruit AS5600 Library, Adafruit BMP5xx Library, Adafruit MLX90632 Library
10+
depends=OmronD6T - Community Fork, SdFat - Adafruit Fork, Adafruit NeoPixel, Adafruit SPA06_003, Adafruit SPIFlash, ArduinoJson, Adafruit DotStar, Adafruit HDC302x, Adafruit INA219, Adafruit INA260 Library, Adafruit INA237 and INA238 Library, Adafruit LTR329 and LTR303, Adafruit LTR390 Library, Adafruit MCP3421, Adafruit MLX90632 Library, Adafruit NAU7802 Library, Adafruit SleepyDog Library, Adafruit TMP117, Adafruit TinyUSB Library, Adafruit AHTX0, Adafruit AS5600 Library, Adafruit BME280 Library, Adafruit BMP280 Library, Adafruit BMP3XX Library, Adafruit BMP5xx Library, Adafruit DPS310, Adafruit DS248x, Adafruit SCD30, Adafruit SGP30 Sensor, Adafruit SGP40 Sensor, Sensirion I2C SCD4x, Sensirion I2C SEN5X, Sensirion I2C SEN66, arduino-sht, Adafruit Si7021 Library, Adafruit MQTT Library, Adafruit MS8607, Adafruit MCP9808 Library, Adafruit MCP9600 Library, Adafruit MPL115A2, Adafruit MPRLS Library, Adafruit TSL2591 Library, Adafruit_VL53L0X, Adafruit VL53L1X, STM32duino VL53L4CD, STM32duino VL53L4CX, Adafruit_VL6180X, Adafruit PM25 AQI Sensor, Adafruit QMC5883P Library, Adafruit VCNL4020 Library, Adafruit VCNL4040, Adafruit VCNL4200 Library, Adafruit VEML7700 Library, Adafruit LC709203F, Adafruit LPS2X, Adafruit LPS28, Adafruit LPS35HW, Adafruit seesaw Library, Adafruit BME680 Library, Adafruit MAX1704X, Adafruit ADT7410 Library, Adafruit HTS221, Adafruit HTU21DF Library, Adafruit HTU31D Library, Adafruit PCT2075, hp_BH1750, ENS160 - Adafruit Fork, Adafruit BusIO, Adafruit Unified Sensor, Sensirion Core, Adafruit GFX Library, Adafruit LED Backpack Library, Adafruit LiquidCrystal, Adafruit SH110X, Adafruit SSD1306

platformio.ini

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ lib_deps =
4040
adafruit/Adafruit LTR390 Library
4141
adafruit/Adafruit LTR329 and LTR303
4242
adafruit/Adafruit PCT2075
43+
adafruit/Adafruit QMC5883P Library
4344
adafruit/Adafruit SCD30
4445
adafruit/Adafruit SGP30 Sensor
4546
adafruit/Adafruit SGP40 Sensor
4647
adafruit/Adafruit Si7021 Library
48+
adafruit/Adafruit SPA06_003
4749
adafruit/Adafruit VCNL4020 Library
4850
adafruit/Adafruit VCNL4040
4951
adafruit/Adafruit VCNL4200 Library
@@ -305,6 +307,14 @@ board_build.filesystem = littlefs
305307
build_type = debug
306308
build_flags = -DARDUINO_ADAFRUIT_QTPY_ESP32
307309

310+
; Adafruit Sparkle Motion
311+
[env:adafruit_sparklemotion_esp32]
312+
extends = common:esp32
313+
board = adafruit_sparklemotion_esp32
314+
board_build.partitions = min_spiffs.csv
315+
board_build.filesystem = littlefs
316+
build_flags = -DARDUINO_SPARKLEMOTION_ESP32
317+
308318
; Adafruit Mini Sparkle Motion
309319
[env:adafruit_sparklemotionmini_esp32]
310320
extends = common:esp32
@@ -445,9 +455,10 @@ build_flags =
445455
-DNON32XFER_FAST
446456
-DDEBUG_DISABLED
447457
-DDEBUG_LEVEL_NONE
458+
-DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48 ; avoid section `.text1' will not fit in region `iram1_0_seg'
448459
board_build.eesz=4M2M
449460
board_build.filesystem = littlefs
450-
upload_port = /dev/cu.SLAB_USBtoUART
461+
upload_port = COM19
451462

452463
; SAMD51 Boards ;
453464

@@ -629,6 +640,16 @@ build_flags =
629640
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6
630641

631642
[env:adafruit_fruitjam]
643+
extends = common:arduinopico
644+
board = adafruit_fruitjam
645+
board_build.filesystem_size = 8m
646+
lib_ignore = WiFi, WiFi101, Adafruit Zero DMA Library
647+
build_flags = -DUSE_TINYUSB -DARDUINO_ADAFRUIT_FRUITJAM_RP2350
648+
649+
[env:adafruit_fruitjam_debug]
650+
extends = common:arduinopico
651+
build_type = debug
632652
board = adafruit_fruitjam
653+
board_build.filesystem_size = 8m
633654
lib_ignore = WiFi, WiFi101, Adafruit Zero DMA Library
634-
build_flags = -DUSE_TINYUSB -DADAFRUIT_FRUITJAM_RP2350
655+
build_flags = -DUSE_TINYUSB -DARDUINO_ADAFRUIT_FRUITJAM_RP2350

src/Wippersnapper.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#define WIPPERSNAPPER_H
2020

2121
// Cpp STD
22+
#include <math.h>
23+
2224
#include <vector>
2325

2426
// Nanopb dependencies
@@ -137,7 +139,7 @@
137139
#endif
138140

139141
#define WS_VERSION \
140-
"1.0.0-beta.112" ///< WipperSnapper app. version (semver-formatted)
142+
"1.0.0-beta.117" ///< WipperSnapper app. version (semver-formatted)
141143

142144
// Reserved Adafruit IO MQTT topics
143145
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic
@@ -360,10 +362,11 @@ class Wippersnapper {
360362
*_displayController; ///< Instance of display controller class
361363

362364
// TODO: does this really need to be global?
363-
uint8_t _macAddr[6]; /*!< Unique network iface identifier */
364-
char sUID[13]; /*!< Unique network iface identifier */
365-
const char *_boardId; /*!< Adafruit IO+ board string */
366-
Adafruit_MQTT *_mqtt; /*!< Reference to Adafruit_MQTT, _mqtt. */
365+
uint8_t _macAddr[6]; /*!< Unique network iface identifier */
366+
char sUID[13]; /*!< Unique network iface identifier */
367+
const char *_airlift_version; /*!< AirLift Firmware version */
368+
const char *_boardId; /*!< Adafruit IO+ board string */
369+
Adafruit_MQTT *_mqtt; /*!< Reference to Adafruit_MQTT, _mqtt. */
367370

368371
secretsConfig _config; /*!< Wippersnapper secrets.json as a struct. */
369372
networkConfig _multiNetworks[3]; /*!< Wippersnapper networks as structs. */

src/Wippersnapper_Boards.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@
193193
#define USE_LITTLEFS
194194
#define USE_STATUS_LED
195195
#define STATUS_LED_PIN LED_BUILTIN
196+
#elif defined(ARDUINO_SPARKLEMOTION_ESP32)
197+
#define BOARD_ID "sparklemotion-esp32"
198+
#define USE_LITTLEFS
199+
#define USE_STATUS_NEOPIXEL
200+
#define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
201+
#define STATUS_NEOPIXEL_NUM 1
196202
#elif defined(ARDUINO_SPARKLEMOTIONMINI_ESP32)
197203
#define BOARD_ID "sparklemotionmini-esp32"
198204
#define USE_LITTLEFS

src/Wippersnapper_Networking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#if defined(ADAFRUIT_METRO_M4_EXPRESS) || \
2525
defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || defined(ADAFRUIT_PYPORTAL) || \
2626
defined(ADAFRUIT_PYPORTAL_M4_TITANO) || defined(USE_AIRLIFT) || \
27-
defined(ADAFRUIT_FRUITJAM_RP2350)
27+
defined(ARDUINO_ADAFRUIT_FRUITJAM_RP2350)
2828
#include "network_interfaces/Wippersnapper_AIRLIFT.h"
2929
/** Nina-FW (adafruit fork) networking class */
3030
typedef Wippersnapper_AIRLIFT Wippersnapper_WiFi;

0 commit comments

Comments
 (0)