Tone Generator module updated for CLUE

This commit is contained in:
Antonio 2020-03-09 10:55:06 +01:00
parent 5244715073
commit a1cc6d6306
4 changed files with 73 additions and 55 deletions

View file

@ -24,10 +24,10 @@
<rect key="frame" x="20" y="0.0" width="374" height="423"/>
</containerView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="xKj-ea-39A">
<rect key="frame" x="8" y="263" width="76" height="152"/>
<rect key="frame" x="8" y="327" width="44" height="88"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ga4-d9-1lz">
<rect key="frame" x="0.0" y="0.0" width="76" height="76"/>
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
<inset key="contentEdgeInsets" minX="6" minY="6" maxX="6" maxY="6"/>
<state key="normal" image="circuit_all"/>
<connections>
@ -35,7 +35,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xLL-a0-gwf">
<rect key="frame" x="0.0" y="76" width="76" height="76"/>
<rect key="frame" x="0.0" y="44" width="44" height="44"/>
<inset key="contentEdgeInsets" minX="6" minY="6" maxX="6" maxY="6"/>
<state key="normal" image="circuit_clear"/>
<connections>
@ -45,7 +45,7 @@
</subviews>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="12T-bB-WIy">
<rect key="frame" x="330" y="339" width="76" height="76"/>
<rect key="frame" x="362" y="371" width="44" height="44"/>
<inset key="contentEdgeInsets" minX="6" minY="6" maxX="6" maxY="6"/>
<state key="normal" image="circuit_reset"/>
<connections>
@ -500,10 +500,10 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="FYu-kC-2q0">
<rect key="frame" x="70" y="730" width="274" height="44"/>
<rect key="frame" x="74" y="730" width="266" height="44"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nxH-er-ZBM" customClass="CornerShadowButton" customModule="BluefruitPlayground_SimulateBluetooth" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="46" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="44" id="LHV-xq-UoT"/>
<constraint firstAttribute="height" constant="44" id="YUR-JQ-XXD"/>
@ -517,7 +517,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jLv-tG-qa5" customClass="CornerShadowButton" customModule="BluefruitPlayground_SimulateBluetooth" customModuleProvider="target">
<rect key="frame" x="76" y="0.0" width="46" height="44"/>
<rect key="frame" x="74" y="0.0" width="44" height="44"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="44" id="Eay-1g-IGd"/>
<constraint firstAttribute="height" constant="44" id="hqq-CF-25R"/>
@ -531,7 +531,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ta7-LK-awK" customClass="CornerShadowButton" customModule="BluefruitPlayground_SimulateBluetooth" customModuleProvider="target">
<rect key="frame" x="152" y="0.0" width="46" height="44"/>
<rect key="frame" x="148" y="0.0" width="44" height="44"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="44" id="ccz-yG-CgQ"/>
<constraint firstAttribute="height" constant="44" id="gLO-Cf-PUP"/>
@ -545,7 +545,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0uY-jB-1Ht" customClass="CornerShadowButton" customModule="BluefruitPlayground_SimulateBluetooth" customModuleProvider="target">
<rect key="frame" x="228" y="0.0" width="46" height="44"/>
<rect key="frame" x="222" y="0.0" width="44" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="CWM-0O-ns9"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="44" id="o2R-dn-3uf"/>
@ -603,7 +603,7 @@
<rect key="frame" x="0.0" y="12" width="414" height="510"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="750" verticalHuggingPriority="750" image="temperature_gauge" translatesAutoresizingMaskIntoConstraints="NO" id="eYC-Gt-apS">
<rect key="frame" x="20" y="67" width="374" height="376"/>
<rect key="frame" x="97" y="144.5" width="220" height="221"/>
<constraints>
<constraint firstAttribute="width" secondItem="eYC-Gt-apS" secondAttribute="height" multiplier="220:221" id="Tur-P3-pES"/>
</constraints>
@ -615,7 +615,7 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OKs-DM-Ka8">
<rect key="frame" x="342" y="438" width="64" height="64"/>
<rect key="frame" x="374" y="470" width="32" height="32"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<inset key="contentEdgeInsets" minX="6" minY="6" maxX="6" maxY="6"/>
<state key="normal" title="ºC" backgroundImage="temperature_swap">
@ -731,27 +731,27 @@
<rect key="frame" x="0.0" y="12" width="414" height="510"/>
<subviews>
<view contentMode="scaleToFill" horizontalHuggingPriority="249" verticalHuggingPriority="249" horizontalCompressionResistancePriority="249" verticalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="zLf-Fi-H66">
<rect key="frame" x="20" y="51" width="374" height="408"/>
<rect key="frame" x="87" y="124" width="240" height="262"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Xxj-ol-hAb">
<rect key="frame" x="0.0" y="0.0" width="374" height="408"/>
<rect key="frame" x="0.0" y="0.0" width="240" height="262"/>
<subviews>
<view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jZX-SK-33o">
<rect key="frame" x="0.0" y="0.0" width="374" height="81.5"/>
<rect key="frame" x="0.0" y="0.0" width="240" height="52.5"/>
<color key="backgroundColor" systemColor="systemRedColor" red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PqL-CE-oDP">
<rect key="frame" x="0.0" y="81.5" width="374" height="322.5"/>
<rect key="frame" x="0.0" y="52.5" width="240" height="207"/>
<subviews>
<view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EJt-MV-fsH">
<rect key="frame" x="0.0" y="0.0" width="138.5" height="322.5"/>
<rect key="frame" x="0.0" y="0.0" width="89" height="207"/>
<color key="backgroundColor" systemColor="systemGreenColor" red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dvq-By-eaI">
<rect key="frame" x="138.5" y="0.0" width="228" height="322.5"/>
<rect key="frame" x="89" y="0.0" width="146" height="207"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="249" verticalHuggingPriority="249" horizontalCompressionResistancePriority="249" verticalCompressionResistancePriority="249" image="humidity_fill" translatesAutoresizingMaskIntoConstraints="NO" id="B9g-ei-Fcg">
<rect key="frame" x="0.0" y="0.0" width="228" height="322.5"/>
<rect key="frame" x="0.0" y="0.0" width="146" height="207"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -763,13 +763,13 @@
</constraints>
</view>
<view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d1M-64-lqP">
<rect key="frame" x="366.5" y="0.0" width="7.5" height="322.5"/>
<rect key="frame" x="235" y="0.0" width="5" height="207"/>
<color key="backgroundColor" systemColor="systemOrangeColor" red="1" green="0.58431372550000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</subviews>
</stackView>
<view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V1f-go-Uqz">
<rect key="frame" x="0.0" y="404" width="374" height="4"/>
<rect key="frame" x="0.0" y="259.5" width="240" height="2.5"/>
<color key="backgroundColor" systemColor="systemPurpleColor" red="0.68627450980000004" green="0.32156862749999998" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</subviews>
@ -788,13 +788,13 @@
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" image="humidity_outline" translatesAutoresizingMaskIntoConstraints="NO" id="g1O-iQ-qQu">
<rect key="frame" x="20" y="51" width="374" height="408"/>
<rect key="frame" x="87" y="124" width="240" height="262"/>
<constraints>
<constraint firstAttribute="width" secondItem="g1O-iQ-qQu" secondAttribute="height" multiplier="120:131" id="nSg-Im-mfj"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="750" verticalCompressionResistancePriority="1000" text="0%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="BCi-JJ-WJB">
<rect key="frame" x="154.5" y="194" width="239.5" height="265"/>
<rect key="frame" x="173.5" y="215.5" width="153.5" height="170.5"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="42"/>
<color key="textColor" red="1" green="0.99998790029999995" blue="0.9999920726" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
@ -908,19 +908,19 @@
<rect key="frame" x="0.0" y="12" width="414" height="510"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="249" verticalHuggingPriority="249" horizontalCompressionResistancePriority="249" verticalCompressionResistancePriority="249" image="pressure_hand" translatesAutoresizingMaskIntoConstraints="NO" id="Pys-h6-hWK">
<rect key="frame" x="193.5" y="72.5" width="27" height="365"/>
<rect key="frame" x="197.5" y="128" width="19" height="254"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" image="pressure_outline" translatesAutoresizingMaskIntoConstraints="NO" id="qar-Qw-2fa">
<rect key="frame" x="20" y="72.5" width="374" height="365"/>
<rect key="frame" x="77" y="128" width="260" height="254"/>
<constraints>
<constraint firstAttribute="width" secondItem="qar-Qw-2fa" secondAttribute="height" multiplier="130:127" id="fut-ab-EWu"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JYL-Re-hQN">
<rect key="frame" x="95" y="412.5" width="224" height="50.5"/>
<rect key="frame" x="129" y="357" width="156" height="50.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="bottom" translatesAutoresizingMaskIntoConstraints="NO" id="TuZ-t8-AxA">
<rect key="frame" x="46" y="0.0" width="132.5" height="50.5"/>
<rect key="frame" x="12" y="0.0" width="132.5" height="50.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="750" verticalCompressionResistancePriority="1000" text="990" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="3fc-lA-gKu">
<rect key="frame" x="0.0" y="0.0" width="81" height="50.5"/>
@ -959,13 +959,13 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="max" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="mQS-JG-YLL">
<rect key="frame" x="339" y="428.5" width="28.5" height="18"/>
<rect key="frame" x="305" y="373" width="28.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="1" green="0.99998790029999995" blue="0.9999920726" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="min" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="6zY-bT-18t">
<rect key="frame" x="50" y="428.5" width="25" height="18"/>
<rect key="frame" x="84" y="373" width="25" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="1" green="0.99998790029999995" blue="0.9999920726" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
@ -1081,11 +1081,11 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9cd-cz-wWH">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9cd-cz-wWH">
<rect key="frame" x="0.0" y="12" width="414" height="350"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" image="tonegenerator_speaker" translatesAutoresizingMaskIntoConstraints="NO" id="Y70-SD-9rD">
<rect key="frame" x="28" y="85" width="358" height="180"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tonegenerator_speaker" translatesAutoresizingMaskIntoConstraints="NO" id="Y70-SD-9rD">
<rect key="frame" x="77" y="85" width="260" height="180"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -1098,7 +1098,7 @@
<constraint firstAttribute="trailingMargin" relation="greaterThanOrEqual" secondItem="Y70-SD-9rD" secondAttribute="trailing" constant="20" id="z0e-dB-Eew"/>
</constraints>
</view>
<view contentMode="scaleToFill" verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bWw-lC-Emh">
<view contentMode="scaleToFill" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bWw-lC-Emh">
<rect key="frame" x="0.0" y="374" width="414" height="400"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Gc2-PQ-UgW">
@ -1796,7 +1796,7 @@
<rect key="frame" x="0.0" y="71" width="348" height="60.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="1000" verticalHuggingPriority="251" image="lightsensor_min" translatesAutoresizingMaskIntoConstraints="NO" id="xIf-cH-XwT">
<rect key="frame" x="0.0" y="0.0" width="32" height="60.5"/>
<rect key="frame" x="0.0" y="14" width="32" height="32"/>
<color key="tintColor" name="panel_text"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="Cnh-ct-KRE"/>
@ -1834,7 +1834,7 @@
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="1000" verticalHuggingPriority="251" image="lightsensor_max" translatesAutoresizingMaskIntoConstraints="NO" id="Syp-9X-v8i">
<rect key="frame" x="316" y="0.0" width="32" height="60.5"/>
<rect key="frame" x="316" y="14" width="32" height="32"/>
<color key="tintColor" name="panel_text"/>
<constraints>
<constraint firstAttribute="width" constant="32" id="ph4-zE-oZL"/>
@ -1918,25 +1918,25 @@
<rect key="frame" x="20" y="0.0" width="319" height="224"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="750" verticalCompressionResistancePriority="1000" text="Title" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2w2-fb-yU1">
<rect key="frame" x="0.0" y="16" width="319" height="0.0"/>
<rect key="frame" x="0.0" y="16" width="319" height="26.5"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
<color key="textColor" name="panel_text"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="LE8-Xm-MyC">
<rect key="frame" x="8" y="36" width="303" height="158"/>
<rect key="frame" x="8" y="62.5" width="303" height="131.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="center" spacing="40" translatesAutoresizingMaskIntoConstraints="NO" id="aGX-eE-4cQ">
<rect key="frame" x="0.0" y="0.0" width="303" height="158"/>
<rect key="frame" x="0.0" y="0.0" width="303" height="131.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="a9L-nV-v5t">
<rect key="frame" x="0.0" y="0.0" width="74.5" height="158"/>
<rect key="frame" x="0.0" y="0.0" width="74.5" height="131.5"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CJ1-3n-P8S">
<rect key="frame" x="0.0" y="0.0" width="74.5" height="150"/>
<rect key="frame" x="0.0" y="0.0" width="74.5" height="103"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" image="status_left" translatesAutoresizingMaskIntoConstraints="NO" id="YGm-Cb-2wM">
<rect key="frame" x="0.0" y="0.0" width="74.5" height="150"/>
<rect key="frame" x="0.0" y="0.0" width="74.5" height="103"/>
<color key="tintColor" red="1" green="0.4073752891886665" blue="0.12012620532416363" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</imageView>
</subviews>
@ -1949,7 +1949,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="751" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="XXXSlide Switch" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lva-OC-wlT">
<rect key="frame" x="0.0" y="158" width="74.5" height="0.0"/>
<rect key="frame" x="0.0" y="111" width="74.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="panel_text"/>
<nil key="highlightedColor"/>
@ -1957,13 +1957,13 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="thZ-V9-9zx">
<rect key="frame" x="114.5" y="0.0" width="74" height="158"/>
<rect key="frame" x="114.5" y="0.0" width="74" height="131.5"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jzv-K5-VcG">
<rect key="frame" x="0.0" y="0.0" width="74" height="150"/>
<rect key="frame" x="0.0" y="0.0" width="74" height="103"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" image="status_a" translatesAutoresizingMaskIntoConstraints="NO" id="Di5-wa-clX">
<rect key="frame" x="0.0" y="0.0" width="74" height="150"/>
<rect key="frame" x="0.0" y="0.0" width="74" height="103"/>
<color key="tintColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
</subviews>
@ -1976,7 +1976,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="751" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="XXXButton A" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4sg-ww-Cfh">
<rect key="frame" x="0.0" y="158" width="74" height="0.0"/>
<rect key="frame" x="0.0" y="111" width="74" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="panel_text"/>
<nil key="highlightedColor"/>
@ -1984,13 +1984,13 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="WS9-eS-UNJ">
<rect key="frame" x="228.5" y="0.0" width="74.5" height="158"/>
<rect key="frame" x="228.5" y="0.0" width="74.5" height="131.5"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fXs-km-nko">
<rect key="frame" x="0.0" y="0.0" width="74.5" height="150"/>
<rect key="frame" x="0.0" y="0.0" width="74.5" height="103"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" image="status_b" translatesAutoresizingMaskIntoConstraints="NO" id="eoc-2h-ygp">
<rect key="frame" x="0.0" y="0.0" width="74.5" height="150"/>
<rect key="frame" x="0.0" y="0.0" width="74.5" height="103"/>
<color key="tintColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
</subviews>
@ -2003,7 +2003,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="751" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="XXXButtonB" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xf1-zu-lRO">
<rect key="frame" x="0.0" y="158" width="74.5" height="0.0"/>
<rect key="frame" x="0.0" y="111" width="74.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="panel_text"/>
<nil key="highlightedColor"/>

View file

@ -200,11 +200,17 @@ Currently active buttons are displayed in orange at the bottom.";
// Tone Generator
"tonegenerator_title" = "Tone Generator";
"tonegenerator_help" = "Tone Generator mode allows you to use Circuit Playground Bluefruit as a simple music synthesizer.
"tonegenerator_help_cpb" = "Tone Generator mode allows you to use Circuit Playground Bluefruit as a simple music synthesizer.
• Press a key on the piano keyboard to play a corresponding tone on the built-in piezo buzzer.
• Press keys in sequence to perform a song";
"tonegenerator_help_clue" = "Tone Generator mode allows you to use CLUE as a simple music synthesizer.
• Press a key on the piano keyboard to play a corresponding tone on the built-in piezo buzzer.
• Press keys in sequence to perform a song";
// Accelerometer
"accelerometer_title" = "Accelerometer";

View file

@ -13,7 +13,6 @@ class HelpViewController: UIViewController {
static let kIdentifier = "HelpNavigationController"//"HelpViewController"
// UI
@IBOutlet weak var messageLabel: UILabel!
@IBOutlet weak var doneButton: UIBarButtonItem!
@IBOutlet weak var contentStackView: UIStackView!
@ -28,7 +27,7 @@ class HelpViewController: UIViewController {
}
// MARK: - Add Items
func addMessage(_ message: String) {
func addMessage(_ message: String?) {
loadViewIfNeeded()
let label = UILabel()

View file

@ -193,11 +193,24 @@ class ToneGeneratorViewController: UIViewController {
return frequency
}
@IBAction func help(_ sender: Any) {
guard let navigationController = storyboard?.instantiateViewController(withIdentifier: HelpViewController.kIdentifier) as? UINavigationController, let helpViewController = navigationController.topViewController as? HelpViewController else { return }
helpViewController.addMessage(LocalizationManager.shared.localizedString("tonegenerator_help"))
var textStringId: String?
if let model = AdafruitBoardsManager.shared.currentBoard?.model {
switch model {
case .circuitPlaygroundBluefruit:
textStringId = "tonegenerator_help_cpb"
case .clue_nRF52840:
textStringId = "tonegenerator_help_clue"
default:
textStringId = nil
}
}
helpViewController.addMessage(textStringId == nil ? nil : LocalizationManager.shared.localizedString(textStringId!))
self.present(navigationController, animated: true, completion: nil)
}
}