Project

General

Profile

Actions

Feature #956

closed

Add platform identifier

Added by Hammel over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Immediate
Assignee:
Start date:
05 Apr 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

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().

revision=$(cat /proc/cpuinfo | grep Revision | cut -f2 -d":" | tr -d '[:space:]')

The values to map to board types are in the comment header for optimizeBoard().

References:
  1. https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes
  2. https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/

Related issues

Blocks launcher - Bug #940: Colored icons are missing.ClosedHammel26 Feb 2023

Actions
Actions #1

Updated by Hammel over 1 year ago

  • Blocks Bug #940: Colored icons are missing. added
Actions #2

Updated by Hammel over 1 year ago

  • Description updated (diff)
Actions #3

Updated by Hammel over 1 year ago

  • Description updated (diff)
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Integrated piboxGetPlatform to libpibox and tested with launcher on RPi3. Feature works well enough for this issue. If problems are found later on other hardware then new issues will be opened.

Closing issue.

Actions

Also available in: Atom PDF