08-13-2019, 08:13 AM
Was asked to make a short guide on compiling the experimental display driver with custom overscan settings, so here we go. This is primarily for those that wish to be able to change the overscan.
If you have any questions, feel free to reply to this thread.
Code:
# First, use cd to go to the directory you want to clone the repository into, then:
git clone https://github.com/juj/fbcp-ili9341
cd fbcp-ili9341
mkdir build
cd build
nano ../freeplaytech_waveshare32b.h #This file has, on the end of the last 4 lines, the overscan values that you can change. Make sure to read the comment above it for information about which side is which
#After saving and quitting or commenting out sleep lines 145, 149, and 153
cmake -DFREEPLAYTECH_WAVESHARE32B=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON -DSTATISTICS=0 ..
make -j
sudo systemctl stop fbcp[variant].service #replace [variant] with the current version of the driver you are using; usually will be fbcpFilled or fbcpCropped
sudo ./fbcp-ili9341 #runs the built binary, use Control-C to exit
#You will probably need to edit the freeplaytech_waveshare32b.h file multiple times to get the overscan correct, so after doing so:
sudo cp ./fbcp-ili9341 /usr/local/bin/fbcp[variant] #replace [variant] with the version of the driver you want to replace, and use sudo systemctl enable/disable to make it the only version running
#You can optionally copy and rename one of the other service files from /lib/systemd/system/fbcp[variant].service, editing the ExecStart field to point to where the new binary is