Skip to content

Commit 3fbe7cd

Browse files
Merge pull request #13 from groundlight/maxm/flip-m5stack-image
flipped image on m5stack cameras, fixed the color yellow for m5stack led integration
2 parents c7087c4 + 2f27c3d commit 3fbe7cd

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ lib_deps =
1717
mobizt/ESP Mail Client@^3.1.11
1818
ademuri/twilio-esp32-client@^0.1.0
1919
build_flags =
20-
'-D VERSION="0.2.0"'
20+
'-D VERSION="0.2.1"'
2121
board_build.partitions = no_ota.csv
2222

2323
[env:esp32cam]

src/deployable_example.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ StaticJsonDocument<1024> synthesisDoc;
190190
pixels.setPixelColor(2, pixels.Color(255, 0, 0));
191191
} else if (label == "UNSURE" || label == "__UNSURE") {
192192
pixels.setPixelColor(0, pixels.Color(0, 0, 0));
193-
pixels.setPixelColor(1, pixels.Color(255, 255, 0));
193+
pixels.setPixelColor(1, pixels.Color(255, 120, 0));
194194
pixels.setPixelColor(2, pixels.Color(0, 0, 0));
195195
} else if (i == 0) {
196196
if (yellow_was_on) {
@@ -201,7 +201,7 @@ StaticJsonDocument<1024> synthesisDoc;
201201
} else {
202202
yellow_was_on = true;
203203
pixels.setPixelColor(0, pixels.Color(0, 0, 0));
204-
pixels.setPixelColor(1, pixels.Color(255, 255, 0));
204+
pixels.setPixelColor(1, pixels.Color(255, 120, 0));
205205
pixels.setPixelColor(2, pixels.Color(0, 0, 0));
206206
}
207207
}
@@ -560,6 +560,11 @@ void setup() {
560560
ESP.restart(); // some boards are less reliable for initialization and will everntually just start working
561561
return;
562562
}
563+
#ifdef CAMERA_MODEL_M5STACK_PSRAM
564+
sensor_t * s = esp_camera_sensor_get();
565+
s->set_vflip(s, 1);
566+
s->set_hmirror(s, 1);
567+
#endif
563568

564569
// alloc memory for 565 frames
565570
frame_565 = (uint8_t *) ps_malloc(FRAME_ARR_LEN);

0 commit comments

Comments
 (0)