Feature #956
Updated by Hammel over 1 year ago
Some features are not useful on RPi1's and Pi Zero's. It would be helpful to have an API to know what platform type an app is running on so less resource intensive options can be chosen. Examples would be the animation on PiNet and colored icons for the launcher.
The API should be piboxGetPlatform() which returns numeric IDs of PIBOX_RPI1, PIBOX_RPI2, PIBOX_RPI3, PIBOX_PIZERO, PIBOX_PIZEROW. The actual model can be identified using the technique in functions:optimizeBoard().
<pre>
revision=$(cat /proc/cpuinfo | grep Revision | cut -f2 -d":" | tr -d '[:space:]')
</pre>
The values to map to board types are in the comment header for optimizeBoard().
References:
# https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes
# https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/