Skip to content

Commit 838aa0a

Browse files
committed
fixup! update weather-forecast sketch
1 parent 66985bf commit 838aa0a

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

examples/weather-forecast/sketch/sketch.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ void loop() {
2222
String weather_forecast;
2323
bool ok = Bridge.call("get_weather_forecast", city).result(weather_forecast);
2424
if (ok) {
25-
if ("sunny" == sequence_name) {
26-
matrix.loadSequence(Sunny);
25+
if (sequence_name == "sunny") {
26+
matrix.loadSequence(sunny);
2727
playRepeat(10);
28-
} else if ("cloudy" == sequence_name) {
29-
matrix.loadSequence(Cloudy);
28+
} else if (sequence_name == "cloudy") {
29+
matrix.loadSequence(cloudy);
3030
playRepeat(10);
31-
} else if ("rainy" == sequence_name) {
32-
matrix.loadSequence(Rainy);
31+
} else if (sequence_name == "rainy") {
32+
matrix.loadSequence(rainy);
3333
playRepeat(20);
34-
} else if ("snowy" == sequence_name) {
35-
matrix.loadSequence(Snowy);
34+
} else if (sequence_name == "snowy") {
35+
matrix.loadSequence(snowy);
3636
playRepeat(10);
37-
} else if ("foggy" == sequence_name) {
38-
matrix.loadSequence(Foggy);
37+
} else if (sequence_name == "foggy") {
38+
matrix.loadSequence(foggy);
3939
playRepeat(5);
4040
}
4141
}

examples/weather-forecast/sketch/weather_frames.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@
44
* SPDX-License-Identifier: MPL-2.0
55
*/
66

7-
const uint32_t Sunny[][5] = {
7+
const uint32_t sunny[][5] = {
88
{0x04812805, 0x80138390, 0x03402902, 0x40000000, 500},
99
{0x12005201, 0xa072009c, 0x0b009400, 0x90000000, 500},
1010
{0x04812805, 0x80138390, 0x03402902, 0x40000000, 500},
1111
};
1212

13-
const uint32_t Cloudy[][5] = {
13+
const uint32_t cloudy[][5] = {
1414
{0x0000380e, 0x20888404, 0x2020fe00, 0x00000000, 500},
1515
{0x00001c07, 0x10444202, 0x10107f00, 0x00000000, 500},
1616
{0x00000e03, 0x88222101, 0x08083f80, 0x00000000, 500},
1717
{0x00001c07, 0x10444202, 0x10107f00, 0x00000000, 500},
1818
};
1919

20-
const uint32_t Rainy[][5] = {
20+
const uint32_t rainy[][5] = {
2121
{0x0780c208, 0x084041fc, 0x08a05100, 0xa0000000, 200},
2222
{0x0780c208, 0x084041fc, 0x02804502, 0x88000000, 200},
2323
{0x0780c208, 0x084041fc, 0x0a201402, 0x28000000, 200},
2424
};
2525

26-
const uint32_t Snowy[][5] = {
26+
const uint32_t snowy[][5] = {
2727
{0x0780c208, 0x084041fc, 0x02004400, 0x88000000, 650},
2828
{0x0780c208, 0x084041fc, 0x00201002, 0x20000000, 650},
2929
{0x0780c208, 0x084041fc, 0x08800100, 0x80000000, 650},
3030
};
3131

32-
const uint32_t Foggy[][5] = {
32+
const uint32_t foggy[][5] = {
3333
{0x0001fb00, 0x006fc000, 0x1f700000, 0x00000000, 660},
3434
{0x0001ef00, 0x0077c000, 0x1fb00000, 0x00000000, 660},
3535
{0x0001fb00, 0x006fc000, 0x1f700000, 0x00000000, 660},

0 commit comments

Comments
 (0)