method-inc / pi-epaper

A tool to help you display images correctly on an Embedded Artists e-ink display from a Raspberry Pi
18 stars 3 forks source link

I see this compile error when I use it - Please help #1

Open mkbhatnagar opened 8 years ago

mkbhatnagar commented 8 years ago

What would've been missed?

pi@mayankpi:~/pi-epaper $ make [CC] main.c [CC] bsp.c [CC] Display_COG_Process.c Display_COG_Process.c: In function ‘epd_InitializeDriver’: Display_COG_Process.c:560:21: warning: iteration 111u invokes undefined behavior [-Waggressive-loop-optimizations] COG_Line.uint8[k] = 0x00; ^ Display_COG_Process.c:558:2: note: containing loop for (k = 0; k <= __LineDataSize; k ++) ^ [CC] Display_Controller.c [CC] Display_Hardware_Driver.c [CC] AsciiImageConverter.c gcc -o ./epaper main.o bsp.o Display_COG_Process.o Display_Controller.o Display_Hardware_Driver.o AsciiImageConverter.o -lwiringPi -lpthread -lm -I/usr/local/include -L/usr/local/lib pi@mayankpi:~/pi-epaper $

markrickert commented 8 years ago

Hey @mkbhatnagar It's been a while since I worked on this and I no longer work for Skookum so I don't have access to the hardware to be able to troubleshoot this... This is the only thing I can find that contains any sort of useful information... but no definitive answer on how to fix it :( http://stackoverflow.com/questions/24296571/why-does-this-loop-produce-warning-iteration-3u-invokes-undefined-behavior-an

mkbhatnagar commented 8 years ago

:-(

Sent from my  6S

On Dec 5, 2015, at 1:40 PM, Mark Rickert notifications@github.com wrote:

Hey @mkbhatnagar It's been a while since I worked on this and I no longer work for Skookum so I don't have access to the hardware to be able to troubleshoot this... This is the only thing I can find that contains any sort of useful information... but no definitive answer on how to fix it :( http://stackoverflow.com/questions/24296571/why-does-this-loop-produce-warning-iteration-3u-invokes-undefined-behavior-an

— Reply to this email directly or view it on GitHub.

mkbhatnagar commented 8 years ago

Well. I fixed the compile error & basically switched ON SPI & I2C both.

Now when I run it goes okay without complaining. But no image displayed on the display :(

pi@mayankpi:~/pi-epaper $ sudo ./epaper ./test_images/velociraptor.png Displaying image from file: ./test_images/velociraptor.png pi@mayankpi:~/pi-epaper $

Any ideas as you can remember?