问题描述
将单转子的风扇Fan属性里面的RearPresence置0后,网页上不显示在位信息,但是在传感器里是显示正常的在位信息的,这两个地方的在位信息处理有什么不同吗
是通过模拟风扇在位Scanner控制的吗
"Fan_2": {
"FanId": 2,
"Slot": 2,
"Coefficient": 60,
"FrontPresence": "<=/Scanner_Fan2_Presence.Value",
"RearPresence": 0,
"FrontSpeed": "<=/Scanner_Fan2_Speed.Value |> expr(($1 // 32) & 255)",
"RearSpeed": "<=/Scanner_Fan2_Speed.Value |> expr(($1 // 32) & 255)",
"HardwarePWM": "#/Accessor_Fan2_PWM.Value",
"SystemId": 1,
"FrontStatus": 0,
"RearStatus": 0,
"MaxSupportedPWM": 255,
"IdentifySpeedLevel": 35,
"Position": "CLU",
"PowerGood": "<=/Scanner_PowerGood.Value"
},
风扇属性是把RearPresence0的
如果把 “RearPresence”: 0,改成"RearPresence": “<=/Scanner_Fan2_Presence.Value”,
就不能进行风扇控制了
"Entity_Fan2": {
"Id": 30,
"Instance": 97,
"Name": "Fan2",
"Presence": "<=/Scanner_Fan2_Presence.Value",
"PowerState": "<=/Scanner_PowerGood.Value"
},
"DiscreteEvent_FAN2FPresence": {
"Property": "<=/Scanner_Fan2_Presence.Value",
"ListenType": 1,
"EventData1": 0,
"EventData2": 255,
"EventData3": 255,
"EventDir": "<=/Scanner_Fan2_Presence.Value",
"Conversion": 1,
"SensorObject": "#/DiscreteSensor_FAN2FPresence"
},
"DiscreteSensor_FAN2FPresence": {
"OwnerId": 32,
"OwnerLun": 0,
"EntityId": "<=/Entity_Fan2.Id",
"EntityInstance": "<=/Entity_Fan2.Instance",
"Initialization": 99,
"Capabilities": 64,
"SensorType": 10,
"ReadingType": 8,
"SensorName": "SYSFAN2 Presence",
"AssertMask": 1,
"DeassertMask": 1,
"DiscreteMask": 1,
"DiscreteType": 0,
"Unit": 192,
"BaseUnit": 0,
"ModifierUnit": 0,
"RecordSharing": 1,
"Reading": 0
},
单转子风扇应该是FrontPresence置0吧,可以看thermal_mgmt组件的逻辑
前转子在位置0后,接上风扇就会扫不到风扇信息
"Fan_2": {
"FanId": 2,
"Slot": 2,
"Coefficient": 60,
"FrontPresence": 0,
"RearPresence": "<=/Scanner_Fan2_Presence.Value",
"FrontSpeed": "<=/Scanner_Fan2_Speed.Value |> expr(($1 // 32) & 255)",
"RearSpeed": "<=/Scanner_Fan2_Speed.Value |> expr(($1 // 32) & 255)",
"HardwarePWM": "#/Accessor_Fan2_PWM.Value",
"SystemId": 1,
"FrontStatus": 0,
"RearStatus": 0,
"MaxSupportedPWM": 255,
"IdentifySpeedLevel": 35,
"Position": "CLU",
"PowerGood": "<=/Scanner_PowerGood.Value"
你是几pin的风扇,硬件有给风扇在位信号吗。如果有给的话,你配对了,风扇页面至少有个检测在位的信息的。
4pin的风扇,硬件是靠检测是否有转速来给在位信号的
没有在位信号,你咋配的<=/Scanner_Fan2_Presence.Value这个。
"Scanner_Fan2_Presence": {
"Chip": "#/Smc_FanBoardSMC",
"Offset": 402656002,
"Size": 1,
"Mask": 1,
"Type": 0,
"Period": 2000,
"Debounce": "None",
"ScanEnabled": "<=/Scanner_PowerGood.Value",
"NominalValue": 1,
"@Default" :{
"ScanEnabled" : 0
},
"Value": 0
},
CPLD通过SMC命令字给到在位信息
你风扇转的情况下,你看下资源树,Fan的实例里面在位信息的值是不是对的,然后通过命令读smc传的在位信息是不是对的上的。我这边适配4pin风扇,cpld给不了在位信号,我是通过cpld给的转速值去判断是否在位。