Skip to content

Commit

Permalink
Apply minor changes for x86 (#2074)
Browse files Browse the repository at this point in the history
* docs: update docs for supported OS for x86
* fix: rename "Raspberry Pi Model" to "Device Model"
  • Loading branch information
nicomiguelino authored Sep 20, 2024
1 parent 8f6d8b0 commit 6ffd239
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We've tested Anthias and is known to work on the following Raspberry Pi models:
* Raspberry Pi 3 Model B+ - 32-bit and 64-bit Bullseye, 64-bit Bookworm
* Raspberry Pi 3 Model B - 64-bit Bookworm and Bullseye
* Raspberry Pi 2 Model B - 32-bit Bookworm and Bullseye
* x86 Devices - 64-bit Bullseye
* x86 Devices - 64-bit Bookworm
* These devices can be something similar to a NUC.


Expand Down
9 changes: 6 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from mimetypes import guess_type, guess_extension
from os import getenv, makedirs, mkdir, path, remove, rename, statvfs, stat
from urllib.parse import urlparse
from platform import machine

from flask import (
Flask,
Expand Down Expand Up @@ -1553,8 +1554,10 @@ def system_info():
# Player name for title
player_name = settings['player_name']

raspberry_pi_model = raspberry_pi_helper.parse_cpu_info().get(
'model', "Unknown")
device_model = raspberry_pi_helper.parse_cpu_info().get('model')

if device_model is None and machine() == 'x86_64':
device_model = 'Generic x86_64 Device'

version = '{}@{}'.format(
diagnostics.get_git_branch(),
Expand All @@ -1569,7 +1572,7 @@ def system_info():
uptime=system_uptime,
memory=memory,
display_power=display_power,
raspberry_pi_model=raspberry_pi_model,
device_model=device_model,
version=version,
mac_address=get_node_mac_address(),
is_balena=is_balena_app(),
Expand Down
4 changes: 2 additions & 2 deletions templates/system-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ <h4 class="page-header text-white">
<td>{{ context.display_power }}</td>
</tr>
<tr>
<th scope="row">Raspberry Pi Model</th>
<td>{{ context.raspberry_pi_model }}</td>
<th scope="row">Device Model</th>
<td>{{ context.device_model }}</td>
</tr>
<tr>
<th scope="row">Anthias Version</th>
Expand Down

0 comments on commit 6ffd239

Please sign in to comment.