mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-19 15:47:40 +03:00
Added timing measurement.
This commit is contained in:
parent
0218b6bde5
commit
bfca248c14
@ -32,8 +32,7 @@ struct BMPHeader {
|
|||||||
// Load BMP file from SD card and rotate 90 degrees clockwise
|
// Load BMP file from SD card and rotate 90 degrees clockwise
|
||||||
// This rotation matches what we need for the e-ink display
|
// This rotation matches what we need for the e-ink display
|
||||||
uint8_t* loadBMP(const char* filename, int& width, int& height) {
|
uint8_t* loadBMP(const char* filename, int& width, int& height) {
|
||||||
// Using rotation type 1: 90 degrees clockwise
|
const unsigned long startTime = millis();
|
||||||
const int rotationType = 1;
|
|
||||||
Serial.printf("[%lu] [SleepScreen] Trying to load BMP: %s\n", millis(), filename);
|
Serial.printf("[%lu] [SleepScreen] Trying to load BMP: %s\n", millis(), filename);
|
||||||
|
|
||||||
if (!SD.exists(filename)) {
|
if (!SD.exists(filename)) {
|
||||||
@ -168,7 +167,8 @@ uint8_t* loadBMP(const char* filename, int& width, int& height) {
|
|||||||
free(rowBuffer);
|
free(rowBuffer);
|
||||||
bmpFile.close();
|
bmpFile.close();
|
||||||
|
|
||||||
Serial.printf("[%lu] [SleepScreen] Successfully loaded BMP: %dx%d\n", millis(), width, height);
|
Serial.printf("[%lu] [SleepScreen] Successfully loaded BMP: %dx%d in %lu ms\n",
|
||||||
|
millis() - startTime, width, height, millis() - startTime);
|
||||||
return displayImage;
|
return displayImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user