Skip to content

Commit 41dc21d

Browse files
authored
Merge pull request #141 from adafruit/fix-fs-issue
WipperSnapper Filesystem refactor, bug-fixes
2 parents 5344016 + 8f3c366 commit 41dc21d

11 files changed

+175
-111
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PROJECT_VER_MAJOR := 1
77
PROJECT_VER_MINOR := 0
88
PROJECT_VER_PATCH := 0
99
PROJECT_VER_BUILD := beta
10-
PROJECT_VER_BUILD_NUM := 7
10+
PROJECT_VER_BUILD_NUM := 8
1111

1212
BOARD_PYPORTAL := samd51-pyportal
1313
BOARD_METRO_AIRLIFT := samd51-metro-airlift

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit WipperSnapper
2-
version=1.0.0-beta.6
2+
version=1.0.0-beta.8
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Arduino library to access WipperSnapper

src/Wippersnapper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
// Wippersnapper API Helpers
3232
#include "Wippersnapper_Boards.h"
3333
#include "Wippersnapper_Registration.h"
34-
#include "Wippersnapper_StatusLED_Colors.h"
34+
#include "components/statusLED/Wippersnapper_StatusLED_Colors.h"
3535

3636
// Wippersnapper GPIO Components
37-
#include "components/Wippersnapper_AnalogIO.h"
38-
#include "components/Wippersnapper_DigitalGPIO.h"
37+
#include "components/analogIO/Wippersnapper_AnalogIO.h"
38+
#include "components/digitalIO/Wippersnapper_DigitalGPIO.h"
3939

4040
// External libraries
4141
#include "Adafruit_MQTT.h" // MQTT Client
@@ -64,7 +64,7 @@
6464
#endif
6565

6666
#define WS_VERSION \
67-
"1.0.0-beta.7" ///< WipperSnapper app. version (semver-formatted)
67+
"1.0.0-beta.8" ///< WipperSnapper app. version (semver-formatted)
6868

6969
// Reserved Adafruit IO MQTT topics
7070
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic

src/Wippersnapper_StatusLED.cpp renamed to src/components/statusLED/Wippersnapper_StatusLED.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bool Wippersnapper::statusLEDInit() {
5757
if (WS.lockStatusDotStar == false) {
5858
statusPixelDotStar->begin();
5959
statusPixelDotStar->show(); // turn all pixels off
60-
statusPixelDotStar->setBrightness(10);
60+
statusPixelDotStar->setBrightness(5);
6161
WS.lockStatusDotStar = true;
6262
is_success = true;
6363
}
@@ -151,25 +151,21 @@ void Wippersnapper::statusLEDBlink(ws_led_status_t statusState) {
151151

152152
int blinkNum = 0;
153153
uint32_t ledBlinkColor;
154-
switch (statusState) {
155-
case WS_LED_STATUS_KAT:
154+
if (statusState == WS_LED_STATUS_KAT) {
156155
blinkNum = 1;
157156
ledBlinkColor = LED_CONNECTED;
158-
break;
159-
case WS_LED_STATUS_ERROR:
157+
} else if (statusState == WS_LED_STATUS_ERROR) {
160158
blinkNum = 2;
161159
ledBlinkColor = LED_ERROR;
162-
case WS_LED_STATUS_CONNECTED:
160+
} else if (statusState == WS_LED_STATUS_CONNECTED) {
163161
blinkNum = 3;
164162
ledBlinkColor = LED_CONNECTED;
165-
break;
166-
case WS_LED_STATUS_FS_WRITE:
163+
} else if (statusState == WS_LED_STATUS_FS_WRITE) {
167164
blinkNum = 4;
168165
ledBlinkColor = YELLOW;
169-
default:
166+
} else {
170167
blinkNum = 0;
171168
ledBlinkColor = BLACK;
172-
break;
173169
}
174170

175171
while (blinkNum > 0) {

src/Wippersnapper_StatusLED_Colors.h renamed to src/components/statusLED/Wippersnapper_StatusLED_Colors.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#define BLUE 0x0000FF ///< Blue (as a uint32)
2323

2424
// colors for each status state
25-
#define LED_HW_INIT PINK ///< Initialization state
2625
#define LED_NET_CONNECT CYAN ///< Network connection state
2726
#define LED_IO_CONNECT BLUE ///< MQTT broker connection state
2827
#define LED_IO_REGISTER_HW YELLOW ///< Hardware registration state

0 commit comments

Comments
 (0)