Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Commit 76c4eeb

Browse files
author
Stephen Schiffli
committed
Merge branch 'release-2.10.0'
2 parents 329b091 + 8d4a2a2 commit 76c4eeb

File tree

162 files changed

+10132
-9779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+10132
-9779
lines changed

Docs/gen_api_reference.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
appledoc -p "MetaWear iOS/macOS/tvOS API 2.9.0" --project-version "2.9.0" -c "MBIENTLAB INC" --company-id com.mbientlab --no-create-docset --no-repeat-first-par --ignore .m -o . ../MetaWear/Classes
1+
appledoc -p "MetaWear iOS/macOS/tvOS API 2.10.0" --project-version "2.10.0" -c "MBIENTLAB INC" --company-id com.mbientlab --no-create-docset --no-repeat-first-par --ignore .m -o . ../MetaWear/Classes
22
open html/index.html
33

44
make html

Docs/source/advanced_features.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The properties of the configuration objected are automatically persisted to disk
2828
Updating Firmware
2929
-----------------
3030

31-
The firmware running on the MetaWear is periodically updated by MbientLab with additional features and bug-fixes. To update, you first call a MetaWear API which puts the device in a special bootloader mode, then use the Nordic Semiconductor `IOS-DFU-Librarly <https://github.com/NordicSemiconductor/IOS-DFU-Library>`_ to upload the new firmware. We recommend looking at our `Sample App <https://github.com/mbientlab/Metawear-SampleiOSApp>`_ for an example on how to integrate.
31+
The firmware running on the MetaWear is periodically updated by MbientLab with additional features and bug-fixes. To update, you first call a MetaWear API which puts the device in a special bootloader mode, then use the Nordic Semiconductor `IOS-DFU-Librarly <https://github.com/NordicSemiconductor/IOS-DFU-Library>`_ to upload the new firmware. We recommend looking at our `Sample App <https://github.com/mbientlab/MetaWear-SampleApp-iOS>`_ for an example on how to integrate.
3232

3333
This is one API you can call WITHOUT being connected, there are some cases where you can't connect because the firmware is too old, but you still need to be able to update it!
3434

Docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
# built documents.
5656
#
5757
# The short X.Y version.
58-
version = '2.9.0'
58+
version = '2.10.0'
5959
# The full version, including alpha/beta/rc tags.
60-
release = '2.9.0'
60+
release = '2.10.0'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

Docs/source/gen_api_reference.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
appledoc -p "MetaWear iOS/macOS/tvOS API 2.9.0" --project-version "2.9.0" -c "MBIENTLAB INC" --company-id com.mbientlab --no-create-docset --no-repeat-first-par --ignore .m -o . ../MetaWear/Classes
1+
appledoc -p "MetaWear iOS/macOS/tvOS API 2.10.0" --project-version "2.10.0" -c "MBIENTLAB INC" --company-id com.mbientlab --no-create-docset --no-repeat-first-par --ignore .m -o . ../MetaWear/Classes
22
open html/index.html
33

44
make html

Docs/source/metawearboard.rst

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ Bluetooth LE Connection
1414
-----------------------
1515
Before using any API features, you must first connect to the board with `connectAsync <https://mbientlab.com/docs/metawear/ios/latest/Classes/MBLMetaWear.html#//api/name/connectAsync>`_. The returned task will finish when a connection has been established and the ``MBLMetaWear`` state has been initialized. ::
1616

17-
device.connectAsync().success { _ in
18-
print("Connected")
19-
}.failure { error in
20-
print("Failed to connect", error)
17+
device.connectAsync().continueOnDispatch { t in
18+
if t.isCancelled {
19+
print("disconnectAsync() called before connection completed")
20+
} else if t.isFaulted {
21+
print("Connection Error: \(t.error?.localizedDescription ?? "N/A")")
22+
} else {
23+
print("Connection Success")
24+
}
25+
return t
2126
}
2227

2328
There is also a convenient `connectWithTimeoutAsync <https://mbientlab.com/docs/metawear/ios/latest/Classes/MBLMetaWear.html#//api/name/connectWithTimeoutAsync:>`_ which will finish when the connection is complete, or timeout seconds have passed. If a timeout occurs, the task will get an error of kMBLErrorDomain and kMBLErrorConnectionTimeout code. ::
@@ -106,7 +111,7 @@ Since we do not support using a single MetaWear device with multiple application
106111
Identifier
107112
----------
108113

109-
Apple generates a unique identifier for each BLE device. Note, two different Apple devices will generate two different identifiers for the same MetaWear.
114+
Apple generates a unique identifier for each BLE device. Note, two different Apple devices will generate two different identifiers for the same MetaWear. It might be useful to use ``device.mac`` instead.
110115

111116
::
112117

@@ -129,3 +134,13 @@ MetaWear modules, represented by the `MBLModule <https://mbientlab.com/docs/meta
129134
* Requested module is not supported on the board
130135
* Board is in MetaBoot mode
131136
* Has not yet connected
137+
138+
Sleep Mode
139+
----------
140+
141+
Use the ``sleepModeOnReset`` function to put the device in a low-power sleep mode after the next reset. To wake the device back up you can press the button, connect usb power (latest models only), or remove and reconnect the coin cell battery.
142+
143+
::
144+
145+
[device sleepModeOnReset];
146+
[device resetDevice];

Docs/source/settings.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ Event representing a BLE disconnection event. Note this doesn't make sense to s
7373
MAC Address
7474
-----------
7575

76-
Get the MAC address of the MetaWear.
76+
Get the MAC address of the MetaWear. As of SDK 2.10.0 this is now automaticaly cached upon connection and avaliable at ``device.mac``.
7777

7878
::
7979

80+
print(device.mac)
8081
device.settings?.macAddress?.readAsync().success { mac in
8182
print(mac)
8283
}

MetaWear.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'MetaWear'
3-
s.version = '2.9.0'
3+
s.version = '2.10.0'
44
s.license = { :type => 'Commercial', :text => 'See https://www.mbientlab.com/terms/', :file => 'LICENSE' }
55
s.homepage = 'https://mbientlab.com'
66
s.summary = 'iOS/macOS/tvOS API and documentation for the MetaWear platform'

MetaWear/Classes/Categories/BFTask+MBLExtensions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ typedef __nullable id(^MBLExtensionsContinuationBlock)(BFTask<ResultType> *t);
8888
@end
8989

9090

91-
extern void MBLForceLoadCategory_BFTask_MBLExtensions();
91+
extern void MBLForceLoadCategory_BFTask_MBLExtensions(void);
9292

9393
NS_ASSUME_NONNULL_END

MetaWear/Classes/Categories/BFTask+MBLExtensions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ + (BFExecutor *)dispatchExecutor
4545
static BFExecutor *singleton;
4646
static dispatch_once_t onceToken = 0;
4747
dispatch_once(&onceToken, ^{
48-
singleton = [BFExecutor executorWithBlock:^void(void(^block)()) {
48+
singleton = [BFExecutor executorWithBlock:^void(void(^block)(void)) {
4949
[[MBLMetaWearManager dispatchQueue] addOperationWithBlock:block];
5050
}];
5151
});
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* MBLAnonymousEvent.h
3+
* MetaWear
4+
*
5+
* Created by Stephen Schiffli on 9/22/17.
6+
* Copyright 2017 MbientLab Inc. All rights reserved.
7+
*
8+
* IMPORTANT: Your use of this Software is limited to those specific rights
9+
* granted under the terms of a software license agreement between the user who
10+
* downloaded the software, his/her employer (which must be your employer) and
11+
* MbientLab Inc, (the "License"). You may not use this Software unless you
12+
* agree to abide by the terms of the License which can be found at
13+
* www.mbientlab.com/terms. The License limits your use, and you acknowledge,
14+
* that the Software may be modified, copied, and distributed when used in
15+
* conjunction with an MbientLab Inc, product. Other than for the foregoing
16+
* purpose, you may not use, reproduce, copy, prepare derivative works of,
17+
* modify, distribute, perform, display or sell this Software and/or its
18+
* documentation for any purpose.
19+
*
20+
* YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
21+
* PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
22+
* INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
23+
* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
24+
* MBIENTLAB OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE,
25+
* STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
26+
* THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED
27+
* TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST
28+
* PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY,
29+
* SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY
30+
* DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
31+
*
32+
* Should you have any questions regarding your right to use this Software,
33+
* contact MbientLab via email: hello@mbientlab.com
34+
*/
35+
36+
#import <MetaWear/MBLEvent.h>
37+
@class MBLDataSample;
38+
39+
/**
40+
Pared down variant of the MBLEvent interface that can only be used to
41+
retrieve logged data from a board that was programmed elsewhere.
42+
*/
43+
@interface MBLAnonymousEvent : MBLEvent<MBLDataSample *>
44+
45+
/*
46+
String identifying the data producer chain
47+
*/
48+
@property (nonatomic, readonly, nullable) NSString *identifier;
49+
50+
@end

0 commit comments

Comments
 (0)