#!/bin/bash

SENSS=1000.0


function cpu_temp_get() {
TempSorceCpu0=`cat /sys/class/thermal/thermal_zone0/temp` 
TempSorceCpu1=`cat /sys/class/thermal/thermal_zone1/temp`  
TempCpu0=`awk -v T=$TempSorceCpu0 -v SENS=$SENSS 'BEGIN{printf("%.2f", T/SENS)}'`
TempCpu1=`awk -v T=$TempSorceCpu1 -v SENS=$SENSS 'BEGIN{printf("%.2f", T/SENS)}'`

#echo "TempCpu: ${TempCpu0} ${TempCpu1}"

eval $1=$TempCpu0
eval $2=$TempCpu1
}



#while [ true ]                                                                  
#do                                                                                              
#cpu_temp_get TempCpu0 TempCpu1
#echo "TempCpu: ${TempCpu0} ${TempCpu1}"
#sleep 0.5
#done





 
