perf(master : nicsensor) update to 1.8.5
优化部分pmbus功能相关的提示性信息
This commit is contained in:
parent
6423cc73a3
commit
d584304e10
18
nicsensor.sh
18
nicsensor.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
SCRIPT_VERSION="1.8.4"
|
SCRIPT_VERSION="1.8.5"
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Project Feature Varible (Change if need)
|
# Project Feature Varible (Change if need)
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
@ -151,7 +151,7 @@ search_plugin_help(){
|
|||||||
|
|
||||||
print_usage(){
|
print_usage(){
|
||||||
echo ""
|
echo ""
|
||||||
echo "================>>> nicsensor script usage <<<=================="
|
echo "=====================>>> nicsensor script usage <<<======================"
|
||||||
echo " Function 1 - Read Sensor Value"
|
echo " Function 1 - Read Sensor Value"
|
||||||
echo " 1) Command Format : ./nicsensor.sh [slot] [sensor tpye] [slave]"
|
echo " 1) Command Format : ./nicsensor.sh [slot] [sensor tpye] [slave]"
|
||||||
echo " 2) Option Detail"
|
echo " 2) Option Detail"
|
||||||
@ -437,6 +437,14 @@ pre_exec_hook(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$Param2" = "pmbus" ];then
|
||||||
|
if [ $param_num -le 3 ];then
|
||||||
|
fmt_print "console" $ERROR "Command Format illegal"
|
||||||
|
echo "Command Format : ./nicsensor.sh [slot] pmbus [slave] [pmbus_command]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# if the action is fru write, need pre-process fru data
|
# if the action is fru write, need pre-process fru data
|
||||||
if [ "$Param2" = "fru" ];then
|
if [ "$Param2" = "fru" ];then
|
||||||
if [ "$option_data" = "write" ];then
|
if [ "$option_data" = "write" ];then
|
||||||
@ -1236,12 +1244,16 @@ process_fru(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# PMBUS Function
|
||||||
|
# ---------------------------------------------------------
|
||||||
#@Param1 : Pmbus Command, hex data
|
#@Param1 : Pmbus Command, hex data
|
||||||
#@Param2 : Pmbus reading size, BYTE(1)|WORD(2)|BLOCK(3)|RAW(4)
|
#@Param2 : Pmbus reading size, BYTE(1)|WORD(2)|BLOCK(3)|RAW(4)
|
||||||
transfer_pmbus_command(){
|
transfer_pmbus_command(){
|
||||||
pmbus_res=`i2ctransfer -y $i2c_bus w1@$chip_slave $1 r$2`
|
pmbus_res=`i2ctransfer -y $i2c_bus w1@$chip_slave $1 r$2`
|
||||||
reset_pca9548 $i2c_bus $pca9548_slave
|
reset_pca9548 $i2c_bus $pca9548_slave
|
||||||
fmt_print "console" $INFO "$option_data Result: $pmbus_res"
|
fmt_print "console" $INFO "$option_data ,Command Code:$pmbus_res"
|
||||||
|
fmt_print "console" $INFO "Result: $pmbus_res"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Do pmbus test if plugin avalible
|
# Do pmbus test if plugin avalible
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user