Skip to content

Commit 2d56990

Browse files
committed
improved code sample and contribution message
1 parent 99e89db commit 2d56990

File tree

14 files changed

+30
-23
lines changed

14 files changed

+30
-23
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void onDataReady(uint32_t lenght) {
104104
It's also possible to define a specific target:
105105
106106
```cpp
107-
uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
107+
const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
108108
radio.setTarget(macRecv);
109109
radio.init();
110110
```
@@ -136,7 +136,7 @@ CamFreenove Camera;
136136
```
137137

138138
>[!TIP]
139-
>For now, it includes drivers for FreenoveS3, XIAOS3, M5UnitCamS3, Freenove WRover, ESP32Cam AI-Thinker and the TTGO T-Journal cameras, but you are able to define your custom camera like is shown in the [custom-camera-sender](https://github.com/hpsaturn/ESPNowCam/tree/master/examples/custom-camera-sender) example. If you can run it in a different camera, please notify me :D
139+
>For now, it includes drivers for FreenoveS3, XIAOS3, M5UnitCamS3, Freenove WRover, ESP32Cam AI-Thinker and the TTGO T-Journal cameras, but you are able to define your custom camera like is shown in the [custom-camera-sender](https://github.com/hpsaturn/ESPNowCam/tree/master/examples/custom-camera-sender) example. If you can run it in a different camera, please notify me via a [GitHub issue](https://github.com/hpsaturn/ESPNowCam/issues/new) or please contribute with the project sending a pull request :D
140140
141141
### PSRAM or DRAM?
142142

examples/custom-camera-sender/custom-camera-sender.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ camera_fb_t* fb;
1515

1616
bool has_psram = false;
1717

18-
// Please change this to your Camera pins:
18+
// !! N O T E !!
19+
// Please change this for your Camera pins if your camera
20+
// is not listed in the examples or driver directory.
21+
22+
// If your new config works and it is not included in the
23+
// drivers section, please notify it via an issue or please
24+
// contribute to the proyect with a pull request. Thanks!
25+
1926
camera_config_t camera_config = {
2027
.pin_pwdn = -1,
2128
.pin_reset = 15,

examples/esp32cam-basic-sender/esp32cam-basic-sender.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ void setup() {
4040
Serial.printf("PSRAM size: %dMb\r\n", psram_size);
4141
}
4242

43-
// M5Core2 receiver target (P2P or 1:1 mode)
44-
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
43+
// Optional set M5Core2 receiver target (P2P or 1:1 mode)
44+
// const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
4545
// radio.setTarget(macRecv);
4646
radio.init();
4747

examples/freenove-basic-sender/freenove-basic-sender.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void setup() {
4141
}
4242

4343
// M5Core2 receiver target (P2P or 1:1 mode)
44-
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
44+
// const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
4545
// radio.setTarget(macRecv);
4646
radio.init();
4747

examples/freenove-tank/freenove-tank.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ void setup() {
287287
delay(1000);
288288

289289
// BE CAREFUL WITH IT, IF JPG LEVEL CHANGES, INCREASE IT
290-
recv_buff = (uint8_t*) ps_malloc(100* sizeof( uint8_t ) ) ;
290+
recv_buff = static_cast<uint8_t*>(ps_malloc(100 * sizeof(uint8_t)));
291291
radio.setRecvBuffer(recv_buff);
292292
radio.setRecvCallback(onDataReady);
293293

294-
uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
294+
const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
295295
radio.setTarget(macRecv);
296296
radio.init(244);
297297

examples/freenoveWR-basic-sender/freenoveWR-basic-sender.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void setup() {
4242
}
4343

4444
// M5Core2 receiver target (P2P or 1:1 mode)
45-
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
45+
// const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
4646
// radio.setTarget(macRecv);
4747
radio.init();
4848

examples/makerfabs-receiver/makerfabs-receiver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void setup() {
6464
}
6565

6666
// BE CAREFUL WITH IT, IF JPG LEVEL CHANGES, INCREASE IT
67-
fb = (uint8_t *)ps_malloc(30000 * sizeof(uint8_t));
67+
fb = static_cast<uint8_t*>(ps_malloc(30000 * sizeof(uint8_t)));
6868

6969
radio.setRecvBuffer(fb);
7070
radio.setRecvCallback(onDataReady);

examples/multi-camera-one-receiver/m5cores3-camera1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void setup() {
5656
}
5757

5858
// M5Core2 receiver MAC: B8:F0:09:C6:0E:CC
59-
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
59+
// const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
6060
// Makerfabs receiver 7C:DF:A1:F3:73:3C
6161
const uint8_t macRecv[6] = {0x7C,0xDF,0xA1,0xF3,0x73,0x3C};
6262

examples/multi-camera-one-receiver/tjournal-camera2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ void setup() {
3333
}
3434

3535
// M5Core2 receiver MAC: B8:F0:09:C6:0E:CC
36-
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
36+
// const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
3737
// Makerfabs receiver 7C:DF:A1:F3:73:3C
38-
uint8_t macRecv[6] = {0x7C,0xDF,0xA1,0xF3,0x73,0x3C};
38+
const uint8_t macRecv[6] = {0x7C,0xDF,0xA1,0xF3,0x73,0x3C};
3939
radio.setTarget(macRecv);
4040
radio.init();
4141

examples/multi-camera-one-receiver/xiao-camera3.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ void setup() {
5151
}
5252

5353
// M5Core2 receiver MAC: B8:F0:09:C6:0E:CC
54-
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
54+
// const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
5555
// Makerfabs receiver 7C:DF:A1:F3:73:3C
56-
uint8_t macRecv[6] = {0x7C,0xDF,0xA1,0xF3,0x73,0x3C};
56+
const uint8_t macRecv[6] = {0x7C,0xDF,0xA1,0xF3,0x73,0x3C};
5757
radio.setTarget(macRecv);
5858
radio.init();
5959

0 commit comments

Comments
 (0)