graphics() improved for Raspberry PI
This commit is contained in:
parent
a2b0906e02
commit
a06c23ae2c
@ -733,8 +733,8 @@ function graphics(callback) {
|
|||||||
}
|
}
|
||||||
if (_linux) {
|
if (_linux) {
|
||||||
// Raspberry: https://elinux.org/RPI_vcgencmd_usage
|
// Raspberry: https://elinux.org/RPI_vcgencmd_usage
|
||||||
if (util.isRaspberry() && util.isRaspbian()) {
|
if (util.isRaspberry()) {
|
||||||
let cmd = 'fbset -s | grep \'mode "\'; vcgencmd get_mem gpu; tvservice -s; tvservice -n;';
|
let cmd = 'fbset -s 2> /dev/null | grep \'mode "\' ; vcgencmd get_mem gpu 2> /dev/null; tvservice -s 2> /dev/null; tvservice -n 2> /dev/null;';
|
||||||
exec(cmd, function (error, stdout) {
|
exec(cmd, function (error, stdout) {
|
||||||
let lines = stdout.toString().split('\n');
|
let lines = stdout.toString().split('\n');
|
||||||
if (lines.length > 3 && lines[0].indexOf('mode "') >= -1 && lines[2].indexOf('0x12000a') > -1) {
|
if (lines.length > 3 && lines[0].indexOf('mode "') >= -1 && lines[2].indexOf('0x12000a') > -1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user