mirror of
https://github.com/paperdash/device-epd.git
synced 2024-11-04 12:00:27 +00:00
code clean up
This commit is contained in:
parent
f4b78d188f
commit
380d16baf4
@ -151,17 +151,16 @@ void jpegFlushFramebuffer()
|
|||||||
|
|
||||||
// initialise the decoder to give access to image information
|
// initialise the decoder to give access to image information
|
||||||
int ret = JpegDec.decodeFile("/tmp.jpeg");
|
int ret = JpegDec.decodeFile("/tmp.jpeg");
|
||||||
if (ret == 1) {
|
if (ret == 1)
|
||||||
Serial.print("decodeFile ret = ");
|
{
|
||||||
Serial.println(ret);
|
|
||||||
|
|
||||||
// print information about the image to the serial port
|
// print information about the image to the serial port
|
||||||
jpegInfo();
|
//jpegInfo();
|
||||||
|
|
||||||
// render the image onto the screen at coordinate 0,0
|
// render the image onto the screen at coordinate 0,0
|
||||||
renderJPEG(0, 0);
|
renderJPEG(0, 0);
|
||||||
|
}
|
||||||
} else {
|
else
|
||||||
|
{
|
||||||
Serial.println("!!!! unkown jpeg format !!!!");
|
Serial.println("!!!! unkown jpeg format !!!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,9 +175,9 @@ void renderMcuBlockPixel(uint32_t x, uint32_t y, uint32_t color)
|
|||||||
uint32_t blockPageY = y - ((y / JpegDec.MCUHeight) * JpegDec.MCUHeight);
|
uint32_t blockPageY = y - ((y / JpegDec.MCUHeight) * JpegDec.MCUHeight);
|
||||||
blockDelta[(blockPageY * MAX_WIDTH) + x] = color;
|
blockDelta[(blockPageY * MAX_WIDTH) + x] = color;
|
||||||
|
|
||||||
|
|
||||||
// full mcu row is complete now
|
// full mcu row is complete now
|
||||||
if (x == JpegDec.width -1 && (y +1) % JpegDec.MCUHeight == 0) {
|
if (x == JpegDec.width - 1 && (y + 1) % JpegDec.MCUHeight == 0)
|
||||||
|
{
|
||||||
// MCU block sizes: 8x8, 16x8 or 16x16
|
// MCU block sizes: 8x8, 16x8 or 16x16
|
||||||
|
|
||||||
uint32_t originOffsetY = ((y / JpegDec.MCUHeight) * JpegDec.MCUHeight);
|
uint32_t originOffsetY = ((y / JpegDec.MCUHeight) * JpegDec.MCUHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user