添加水位报警

This commit is contained in:
kai60 2020-06-14 15:56:37 +08:00
parent 94d926fdaa
commit 1ba176bf37
5 changed files with 49 additions and 9 deletions

View File

@ -15745,7 +15745,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;
@ -15863,7 +15863,7 @@
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;

View File

@ -35,6 +35,10 @@
xuanduoModel.alarmSwitch = [dataString substringWithRange:NSMakeRange(74, 2)];
xuanduoModel.miniTemp = [dataString substringWithRange:NSMakeRange(76, 4)];
xuanduoModel.maxTemp = [dataString substringWithRange:NSMakeRange(80, 4)];
if (dataString.length==90)
{
xuanduoModel.waterLevel=[dataString substringWithRange:NSMakeRange(84, 2)];
}
}
else if ([type isEqualToString:DECICE_TYPE_XUANDUO3F]&&[model isKindOfClass:[Xuanduo3fModel class]])
{

View File

@ -66,6 +66,8 @@ bfec crc16校验码
@property (nonatomic, strong) NSString *miniTemp;
/// 最高温
@property (nonatomic, strong) NSString *maxTemp;
@property (nonatomic, strong) NSString *waterLevel;//水位报警开关
@end

View File

@ -69,6 +69,7 @@
@property(nonatomic,strong) XuanduoCycleModel *cycleModel;
@property(nonatomic,assign) NSInteger heartCount;
@property (weak, nonatomic) IBOutlet UILabel *waterLever;
@ -254,6 +255,7 @@
// NSLog(@"soket错误断开");
// NSLog(@"存留数据%@",[sock unreadData]);
_offLineLabel.hidden = NO;
self.waterLever.hidden=YES;
}
-(BOOL)ifishSocketWillConnect:(AsyncSocket *)sock{
@ -360,8 +362,24 @@
_offLineLabel.hidden = YES;
}else {
_offLineLabel.hidden = NO;
self.waterLever.hidden=YES;
}
[Xuanduo2DataUtility resetNewXuanduoButtonState:self.uvLight gasPumpLight:self.gasPumpLight light1:self.light1 light2:self.light2 waveLight:self.waveLight huliLight:self.huliLight waterLight:self.waterLight heatLight:self.heatLight withModel:self.dataModel type:self.currentDevice.type];
if ([self.currentDevice.type isEqualToString:DECICE_TYPE_XUANDUO2F]) {
if (self.dataModel.waterLevel.length&&([self.dataModel.waterLevel isEqualToString:@"01"]||[self.dataModel.waterLevel isEqualToString:@"02"]))
{
self.waterLever.text=@"水位报警";
self.waterLever.textColor=[UIColor redColor];
self.waterLever.hidden=NO;
}
else
{
self.waterLever.hidden=YES;
}
}
//

View File

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -35,6 +33,7 @@
<outlet property="tipLabel" destination="vcu-MT-d6F" id="f4o-WG-803"/>
<outlet property="uvLight" destination="ucP-6q-kgn" id="h0M-05-ZQd"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
<outlet property="waterLever" destination="lbc-Lu-TSt" id="f4i-pp-pHB"/>
<outlet property="waterLight" destination="94R-4Q-SUx" id="sLi-lF-GPC"/>
<outlet property="waterLightTop" destination="kES-AW-PEh" id="AEG-4b-dSg"/>
<outlet property="waveLight" destination="83l-yl-ndR" id="Ppq-0b-uJB"/>
@ -49,7 +48,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H1f-gs-HPh">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aik-7S-q8v" userLabel="Content View">
<rect key="frame" x="0.0" y="0.0" width="375" height="802.5"/>
@ -278,6 +277,21 @@
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="设备已离线" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lbc-Lu-TSt" userLabel="waterLevel">
<rect key="frame" x="147.5" y="338" width="80" height="25"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="hbR-Gb-glr"/>
<constraint firstAttribute="width" constant="80" id="r6V-4R-2Wp"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" systemColor="systemRedColor" red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="5"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</label>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iCh-CK-V5y" userLabel="切换摄像头">
<rect key="frame" x="275" y="280" width="80" height="20"/>
<color key="backgroundColor" red="0.96078431369999995" green="0.66666666669999997" blue="0.73725490199999999" alpha="1" colorSpace="calibratedRGB"/>
@ -300,11 +314,13 @@
<constraints>
<constraint firstItem="WFc-cF-80l" firstAttribute="top" secondItem="ZVe-ED-kl7" secondAttribute="top" id="0BY-oG-gcd"/>
<constraint firstItem="ASo-hi-5ge" firstAttribute="top" secondItem="EVp-Sm-Feq" secondAttribute="bottom" constant="-20" id="0bJ-eb-80r"/>
<constraint firstItem="lbc-Lu-TSt" firstAttribute="leading" secondItem="Jp2-HW-vcX" secondAttribute="leading" id="2KH-LO-QLQ"/>
<constraint firstItem="ZVe-ED-kl7" firstAttribute="width" secondItem="94R-4Q-SUx" secondAttribute="width" id="3se-2R-nR8"/>
<constraint firstItem="vcu-MT-d6F" firstAttribute="top" secondItem="brS-3x-RcE" secondAttribute="bottom" constant="15" id="4B2-Mr-ob3"/>
<constraint firstItem="OLb-WT-tQ0" firstAttribute="top" secondItem="ucP-6q-kgn" secondAttribute="bottom" constant="4" id="4Bf-gm-YTx"/>
<constraint firstItem="pjU-4c-KIu" firstAttribute="top" secondItem="KcF-jg-Mz2" secondAttribute="bottom" constant="8" id="4U0-5n-ux5"/>
<constraint firstItem="iCh-CK-V5y" firstAttribute="width" secondItem="ASo-hi-5ge" secondAttribute="width" id="4yK-Q4-cCT"/>
<constraint firstItem="lbc-Lu-TSt" firstAttribute="top" secondItem="Jp2-HW-vcX" secondAttribute="top" id="51X-gd-4Dw"/>
<constraint firstItem="k4O-MJ-aZd" firstAttribute="top" secondItem="RHd-Xx-AyG" secondAttribute="bottom" constant="4" id="6Bg-et-4ju"/>
<constraint firstItem="iCh-CK-V5y" firstAttribute="top" secondItem="ASo-hi-5ge" secondAttribute="top" id="7mh-MV-e13"/>
<constraint firstItem="G1c-II-WK8" firstAttribute="top" secondItem="aik-7S-q8v" secondAttribute="top" id="83E-pJ-8Fg"/>
@ -395,7 +411,7 @@
</view>
</objects>
<resources>
<image name="brandLogo_hold.png" width="126" height="63"/>
<image name="brandLogo_hold.png" width="126.5" height="63.5"/>
<image name="dengguang_normal" width="52" height="52"/>
<image name="dengguang_selected" width="52" height="52"/>
<image name="huli_noraml" width="52" height="52"/>