Skip to content

Commit

Permalink
restored XCLK frequency and commented all debug msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
hpsaturn committed Jan 27, 2024
1 parent dc278d4 commit 75f0601
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
9 changes: 5 additions & 4 deletions examples/core2-espnow-receiver/core2-espnow-receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ uint8_t *fb;
Frame msg = Frame_init_zero;

uint32_t fbpos = 0;
uint32_t cksum = 0;
// uint32_t cksum = 0;

bool decode_data(pb_istream_t *stream, const pb_field_t *field, void **arg) {
uint64_t value;
if (!pb_decode_varint(stream, &value))
return false;
cksum = cksum + (uint8_t) value;
// cksum = cksum + (uint8_t) value;
fb[fbpos++] = (uint8_t) value;
return true;
}
Expand Down Expand Up @@ -66,9 +66,9 @@ void msgReceiveCb(const uint8_t *macAddr, const uint8_t *data, int dataLen) {
// printFB(msg.lenght);
// Serial.printf("\r\nfb size: %i msg lenght: %i cksum: %u\r\n",fbpos,msg.lenght,cksum);
M5.Display.drawJpg(fb, msg.lenght , 0, 0, dw, dh);
printFPS("ESPNow reception at:");
// printFPS("ESPNow reception at:");
fbpos = 0;
cksum = 0;
// cksum = 0;
}
// Serial.printf("chunk len: %d\r\n",msg.lenght);
}
Expand Down Expand Up @@ -122,6 +122,7 @@ void setup() {
Serial.printf("PSRAM size: %dMb\r\n", psram_size);
}

// BE CAREFUL WITH IT, IF JPG LEVEL CHANGES, INCREASE IT
fb = (uint8_t*) malloc(3500* sizeof( uint8_t ) ) ;

delay(1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ uint8_t *fb;
Frame msg = Frame_init_zero;

uint32_t fbpos = 0;
uint32_t cksum = 0;
// uint32_t cksum = 0;

bool decode_data(pb_istream_t *stream, const pb_field_t *field, void **arg) {
uint64_t value;
if (!pb_decode_varint(stream, &value))
return false;
cksum = cksum + (uint8_t) value;
// cksum = cksum + (uint8_t) value;
fb[fbpos++] = (uint8_t) value;
return true;
}
Expand Down Expand Up @@ -64,9 +64,9 @@ void msgReceiveCb(const uint8_t *macAddr, const uint8_t *data, int dataLen) {
// printFB(msg.lenght);
// Serial.printf("\r\nfb size: %i msg lenght: %i cksum: %u\r\n",fbpos,msg.lenght,cksum);
CoreS3.Display.drawJpg(fb, msg.lenght , 0, 0, dw, dh);
printFPS("ESPNow reception at:");
// printFPS("ESPNow reception at:");
fbpos = 0;
cksum = 0;
// cksum = 0;
}
// Serial.printf("chunk len: %d\r\n",msg.lenght);
}
Expand Down Expand Up @@ -124,6 +124,7 @@ void setup() {
Serial.printf("PSRAM size: %dMb\r\n", psram_size);
}

// BE CAREFUL WITH IT, IF JPG LEVEL CHANGES, INCREASE IT
fb = (uint8_t*) malloc(3500* sizeof( uint8_t ) ) ;

delay(1000);
Expand Down
2 changes: 1 addition & 1 deletion lib/common/CamFreenove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static camera_config_t camera_config = {
.pin_href = 7,
.pin_pclk = 13,

.xclk_freq_hz = 10000000,
.xclk_freq_hz = 20000000,
.ledc_timer = LEDC_TIMER_0,
.ledc_channel = LEDC_CHANNEL_0,

Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ password = ${sysenv.PIO_WIFI_PASSWORD}
[env]
platform = espressif32
framework = arduino
upload_speed = 3000000
; upload_speed = 3000000
monitor_speed = 115200
monitor_filters =
esp32_exception_decoder
Expand Down

0 comments on commit 75f0601

Please sign in to comment.