Skip to content

Commit

Permalink
SDK release 5.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuli Määttä committed Oct 25, 2023
1 parent c0f3648 commit 784f7ed
Show file tree
Hide file tree
Showing 61 changed files with 2,354 additions and 168 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1004,22 +1004,22 @@ class PolarBleSdkManager : ObservableObject {
}
}

func enableLedAnimation(enable: Bool) async {
func setLedConfig(ledConfig: LedConfig) async {
if case .connected(let deviceId) = deviceConnectionState {
do {
let _: Void = try await api.enableLedAnimation(deviceId, enable: enable).value
let _: Void = try await api.setLedConfig(deviceId, ledConfig: ledConfig).value
Task { @MainActor in
self.generalMessage = Message(text: "enableLedAnimation() set to: \(enable)")
self.generalMessage = Message(text: "setLedConfig() set to: \(ledConfig)")
}
} catch let err {
Task { @MainActor in
self.somethingFailed(text: "enableLedAnimation() error: \(err)")
self.somethingFailed(text: "setLedConfig() error: \(err)")
}

}
} else {
Task { @MainActor in
self.somethingFailed(text: "enableLedAnimation() failed. No device connected)")
self.somethingFailed(text: "setLedConfig() failed. No device connected)")
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions polar-sdk-android/docs/allclasses.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ <h1 class="bar">All Classes</h1>

<li><a href=com/polar/sdk/api/errors/PolarServiceNotAvailable.html>PolarServiceNotAvailable</a></li>

<li><a href=com/polar/sdk/api/model/LedConfig.html>LedConfig</a></li>

<li><a href=com/polar/sdk/api/model/PolarAccelerometerData.html>PolarAccelerometerData</a></li>

<li><a href=com/polar/sdk/api/model/PolarDeviceInfo.html>PolarDeviceInfo</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,48 +232,54 @@ <h3>Enum Constant Summary</h3>
</tr>

<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_POLAR_LED_ANIMATION>FEATURE_POLAR_LED_ANIMATION</a></a></span></code></th>
<td class="colLast"><p>Feature to enable or disable SDK mode blinking LED animation.</p></td>
</tr>

<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_POLAR_SDK_MODE>FEATURE_POLAR_SDK_MODE</a></a></span></code></th>
<td class="colLast"><p>In SDK mode the wider range of capabilities are available for the online stream or offline recoding than in normal operation mode.</p></td>
</tr>

<tr class="rowColor">
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_POLAR_DEVICE_TIME_SETUP>FEATURE_POLAR_DEVICE_TIME_SETUP</a></a></span></code></th>
<td class="colLast"><p>Feature to read and set device time in Polar device</p></td>
</tr>

<tr class="altColor">
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_POLAR_H10_EXERCISE_RECORDING>FEATURE_POLAR_H10_EXERCISE_RECORDING</a></a></span></code></th>
<td class="colLast"><p>H10 exercise recording feature to record exercise data to Polar H10 device without continuous BLE connection.</p></td>
</tr>

<tr class="rowColor">
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_POLAR_OFFLINE_RECORDING>FEATURE_POLAR_OFFLINE_RECORDING</a></a></span></code></th>
<td class="colLast"><p>Polar offline recording feature to record offline data to Polar device without continuous BLE connection.</p></td>
</tr>

<tr class="altColor">
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_POLAR_ONLINE_STREAMING>FEATURE_POLAR_ONLINE_STREAMING</a></a></span></code></th>
<td class="colLast"><p>Polar sensor streaming feature to stream live online data. For example hr, ecg, acc, ppg, ppi, etc...</p></td>
</tr>

<tr class="rowColor">
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_BATTERY_INFO>FEATURE_BATTERY_INFO</a></a></span></code></th>
<td class="colLast"><p>Feature to receive battery level info from Polar or any other BLE device</p></td>
</tr>

<tr class="altColor">
<tr class="rowColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_DEVICE_INFO>FEATURE_DEVICE_INFO</a></a></span></code></th>
<td class="colLast"><p>Device information feature to receive sw information from Polar or any other BLE device</p></td>
</tr>

<tr class="rowColor">
<tr class="altColor">
<th class="colFirst" scope="row"><code><span class="memberNameLink"><a
href="TODO"><a href=PolarBleApi.PolarBleSdkFeature.html#FEATURE_HR>FEATURE_HR</a></a></span></code></th>
<td class="colLast"><p>Hr feature to receive hr and rr data from Polar or any other BLE device via standard HR BLE service</p></td>
Expand Down
74 changes: 73 additions & 1 deletion polar-sdk-android/docs/com/polar/sdk/api/PolarBleApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,22 @@ <h3>Method Summary</h3>
<td class="colLast">Get <a href=model/PolarDiskSpaceData.html>PolarDiskSpaceData</a> from device.</td>
</tr>

<tr id="i19" class="rowColor">
<td class="colFirst"><code>abstract Completable</code>
</td>
<th class="colSecond" scope="row"><code><a href=PolarBleApi.html#setLedConfig(String,LedConfig)>setLedConfig</a>(<a href=https://developer.android.com/reference/kotlin/java/lang/String.html>String</a> identifier, <a href=model/LedConfig.html>LedConfig</a> ledConfig) </code>
</th>
<td class="colLast">Set <a href=model/LedConfig.html>LedConfig</a> for device (Verity Sense 2.2.1+).</td>
</tr>

<tr id="i20" class="altColor">
<td class="colFirst"><code>abstract Completable</code>
</td>
<th class="colSecond" scope="row"><code><a href=PolarBleApi.html#doFactoryReset(String,Boolean)>doFactoryReset</a>(<a href=https://developer.android.com/reference/kotlin/java/lang/String.html>String</a> identifier, <a href=https://developer.android.com/reference/kotlin/java/lang/Boolean.html>Boolean</a> preservePairingInformation) </code>
</th>
<td class="colLast">Perform factory reset to given device.</td>
</tr>

</tbody>
</table>
</div>
Expand Down Expand Up @@ -906,7 +922,7 @@ <h4>startListenForPolarHrBroadcasts</h4>
<!-- -->
</a>
<ul class=
"blockListLast"
"blockList"
>
<li class="blockList">
<h4>getDiskSpace</h4>
Expand All @@ -926,6 +942,62 @@ <h4>getDiskSpace</h4>
</li>
</ul>

<a id="setLedConfig(String,LedConfig)">
<!-- -->
</a>
<ul class=
"blockList"
>
<li class="blockList">
<h4>setLedConfig</h4>
<pre class="methodSignature"> abstract Completable <a href=PolarBleApi.html#setLedConfig(String,LedConfig)>setLedConfig</a>(<a href=https://developer.android.com/reference/kotlin/java/lang/String.html>String</a> identifier, <a href=model/LedConfig.html>LedConfig</a> ledConfig)</pre>
<div class="block"><p>Set <a href=model/LedConfig.html>LedConfig</a> for device (Verity Sense 2.2.1+).</p></div>

<dl>
<dt><span class="paramLabel">Parameters:</span></dt>


<dd><code>identifier</code> - Polar device ID or BT address</dd>



<dd><code>ledConfig</code> - new <a href=model/LedConfig.html>LedConfig</a><ul><li><p>@return Completable emitting success or error</p></li></ul></dd>


</dl>

<!-- TODO missing return annotation -->
</li>
</ul>

<a id="doFactoryReset(String,Boolean)">
<!-- -->
</a>
<ul class=
"blockListLast"
>
<li class="blockList">
<h4>doFactoryReset</h4>
<pre class="methodSignature"> abstract Completable <a href=PolarBleApi.html#doFactoryReset(String,Boolean)>doFactoryReset</a>(<a href=https://developer.android.com/reference/kotlin/java/lang/String.html>String</a> identifier, <a href=https://developer.android.com/reference/kotlin/java/lang/Boolean.html>Boolean</a> preservePairingInformation)</pre>
<div class="block"><p>Perform factory reset to given device.</p></div>

<dl>
<dt><span class="paramLabel">Parameters:</span></dt>


<dd><code>identifier</code> - Polar device ID or BT address</dd>



<dd><code>preservePairingInformation</code> - preserve pairing information during factory reset</dd>


</dl>

<!-- TODO missing return annotation -->
</li>
</ul>

</li>
</ul>
</section>
Expand Down
Loading

0 comments on commit 784f7ed

Please sign in to comment.