Skip to content

Commit

Permalink
v6.23
Browse files Browse the repository at this point in the history
+ DietPi-Config | Alignment
  • Loading branch information
MichaIng authored May 6, 2019
1 parent 33f6bca commit 528b1bb
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ More info here: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p10500

elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then #REMOVE v6.24

gpu_mem_current=$((1024-ram_mem_current))
gpu_mem_current=$((1024-ram_mem_current))

elif (( $G_HW_MODEL == 12 )); then

Expand Down Expand Up @@ -2027,58 +2027,57 @@ More info here: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p10500

fi

# Odroid C1
#REMOVE v6.24
elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then
# Odroid C1: REMOVE v6.24
elif (( $G_HW_MODEL == 10 && $G_DISTRO == 3 )); then

# Odroid HDMI/headless extra data
local display_output_enabled=$(grep -ci -m1 '^setenv hdmioutput "1"' /DietPi/boot.ini)
local display_vpu_enabled=$(grep -ci -m1 '^setenv vpu "1"' /DietPi/boot.ini)
local display_output_text='[On]'
local display_vpu_text='[On]'
# Odroid HDMI/headless extra data
local display_output_enabled=$(grep -ci -m1 '^setenv hdmioutput "1"' /DietPi/boot.ini)
local display_vpu_enabled=$(grep -ci -m1 '^setenv vpu "1"' /DietPi/boot.ini)
local display_output_text='[On]'
local display_vpu_text='[On]'

(( $display_output_enabled )) || display_output_text='[Off]'
(( $display_vpu_enabled )) || display_vpu_text='[Off]'
(( $display_output_enabled )) || display_output_text='[Off]'
(( $display_vpu_enabled )) || display_vpu_text='[Off]'

G_WHIP_MENU_ARRAY=(
G_WHIP_MENU_ARRAY=(

'Headless' 'HDMI: Disabled | VPU: Disabled'
'Server' 'HDMI: Enabled | VPU: Disabled'
'Desktop' 'HDMI: Enabled | VPU: Enabled'
'Headless' 'HDMI: Disabled | VPU: Disabled'
'Server' 'HDMI: Enabled | VPU: Disabled'
'Desktop' 'HDMI: Enabled | VPU: Enabled'

)
)

G_WHIP_MENU "Hardware : $G_HW_MODEL_DESCRIPTION \nCurrent : HDMI: $display_output_text | VPU: $display_vpu_text \n Memory : $gpu_mem_current MB GPU | $ram_mem_current MB RAM \n NB: GPU/RAM figures require a reboot after a change is made."
if (( $? == 0 )); then
G_WHIP_MENU "Hardware : $G_HW_MODEL_DESCRIPTION \nCurrent : HDMI: $display_output_text | VPU: $display_vpu_text \n Memory : $gpu_mem_current MB GPU | $ram_mem_current MB RAM \n NB: GPU/RAM figures require a reboot after a change is made."
if (( $? == 0 )); then

REBOOT_REQUIRED=1
REBOOT_REQUIRED=1

TARGETMENUID=6 # Return to this menu
TARGETMENUID=6 # Return to this menu

case "$G_WHIP_RETURNED_VALUE" in
case "$G_WHIP_RETURNED_VALUE" in

'Headless')
'Headless')

/DietPi/dietpi/func/dietpi-set_hardware headless 1
/DietPi/dietpi/func/dietpi-set_hardware headless 1

;;
;;

'Server')
'Server')

/DietPi/dietpi/func/dietpi-set_hardware headless 0
G_CONFIG_INJECT 'setenv vpu ' 'setenv vpu "0"' /DietPi/boot.ini
/DietPi/dietpi/func/dietpi-set_hardware headless 0
G_CONFIG_INJECT 'setenv vpu ' 'setenv vpu "0"' /DietPi/boot.ini

;;
;;

'Desktop')
'Desktop')

/DietPi/dietpi/func/dietpi-set_hardware headless 0
/DietPi/dietpi/func/dietpi-set_hardware headless 0

;;
;;

esac
esac

fi
fi

# Odroid C2
elif (( $G_HW_MODEL == 12 )); then
Expand Down

0 comments on commit 528b1bb

Please sign in to comment.