| | |
| | | break; |
| | | case Command.SetACModeACK: |
| | | case Command.ReadACModeACK: |
| | | foreach (var function in FunctionList.List.Functions) |
| | | foreach (var function in FunctionList.List.GetAcList()) |
| | | { |
| | | if (function.bus == null || function.spk != SPK.AcStandard) |
| | | if (function.bus == null) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | function.bus.DeviceID == deviceID && |
| | | function.bus.LoopId == receiveBytes[0]) |
| | | { |
| | | Console.WriteLine(function.GetBusId()); |
| | | function.SetAttrState(FunctionAttributeKey.TempType, receiveBytes[1].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.RoomTemp, receiveBytes[2].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.CoolTemperatrue, receiveBytes[3].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.HeatTemperatrue, receiveBytes[4].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.AutoTemperatrue, receiveBytes[5].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.DehumiTemperatrue, receiveBytes[6].ToString()); |
| | | function.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[8] == 1 ? "on" : "off"); |
| | | acFunction.SetMode(receiveBytes[9], function); |
| | | acFunction.SetFan(receiveBytes[10], function); |