| | |
| | | if (function.GetAttribute(FunctionAttributeKey.Percent) != null) |
| | | { |
| | | state = function.GetAttrState(FunctionAttributeKey.Percent) != "0"; |
| | | }else |
| | | } |
| | | else |
| | | { |
| | | if (function.GetAttrState(FunctionAttributeKey.OnOff) == "stop") |
| | | return; |
| | | state = function.trait_on_off.curValue.ToString() == "on"; |
| | | } |
| | | } |
| | | else if (function.spk == SPK.SenesorMegahealth) |
| | | { |
| | | |
| | | var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus); |
| | | if (tempStatus != null) |
| | | { |
| | | switch (tempStatus.state) |
| | | {//0空,1走,2跑,3坐,4跌倒,5站 |
| | | case "0": |
| | | state = false; |
| | | break; |
| | | case "1": |
| | | state = true; |
| | | break; |
| | | case "2": |
| | | if (function.extSet.labModel) |
| | | { |
| | | state = true; |
| | | } |
| | | break; |
| | | case "3": |
| | | if (function.extSet.labModel) |
| | | { |
| | | state = true; |
| | | } |
| | | break; |
| | | case "4": |
| | | state = true; |
| | | break; |
| | | case "5": |
| | | if (function.extSet.labModel) |
| | | { |
| | | state = true; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | state = function.trait_on_off.curValue.ToString() == "on"; |