updated docs
This commit is contained in:
		| @@ -29,9 +29,13 @@ bluetooth.advertiseUrl("https://pxt.microbit.org/", 7); | |||||||
| ### Example: Broadcast a secret code | ### Example: Broadcast a secret code | ||||||
|  |  | ||||||
| ```blocks | ```blocks | ||||||
| bluetooth.advertiseUrl("https://pxt.io?secret=42") | bluetooth.advertiseUrl("https://pxt.io?secret=42", 7); | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ## See Also | ## See Also | ||||||
|  |  | ||||||
| [stop-advertising](/reference/bluetooth/stop-advertising) | [stop-advertising](/reference/bluetooth/stop-advertising) | ||||||
|  |  | ||||||
|  | ```package | ||||||
|  | bluetooth | ||||||
|  | ``` | ||||||
| @@ -18,9 +18,17 @@ Read more at https://lancaster-university.github.io/microbit-docs/ble/eddystone/ | |||||||
| ## ~ | ## ~ | ||||||
|  |  | ||||||
| ```sig | ```sig | ||||||
| bluetooth.stop-advertising(); | bluetooth.stopAdvertising(); | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ## See Also | ## See Also | ||||||
|  |  | ||||||
| [advertise-url](/reference/bluetooth/advertise-url) | [advertise-url](/reference/bluetooth/advertise-url) | ||||||
|  |  | ||||||
|  | ```blocks | ||||||
|  | bluetooth.stopAdvertising(); | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | ```package | ||||||
|  | bluetooth | ||||||
|  | ``` | ||||||
| @@ -127,8 +127,8 @@ namespace bluetooth { | |||||||
| 	* @param url the url to transmit. Must be no longer than the supported eddystone url length | 	* @param url the url to transmit. Must be no longer than the supported eddystone url length | ||||||
| 	* @param power power level between 0 and 7, e.g.: 7 | 	* @param power power level between 0 and 7, e.g.: 7 | ||||||
|     */ |     */ | ||||||
|     //% blockId=eddystone_advertise_url block="eddystone advertise url %url|power %powerLevel" |     //% blockId=eddystone_advertise_url block="advertise url %url|power %power" | ||||||
|     //% parts=bluetooth |     //% parts=bluetooth weight=11 | ||||||
|     //% help=bluetooth/advertise-url |     //% help=bluetooth/advertise-url | ||||||
|     void advertiseUrl(StringData* url, int power) { |     void advertiseUrl(StringData* url, int power) { | ||||||
|         int8_t level = CALIBRATED_POWERS[min(7, max(0, power))]; |         int8_t level = CALIBRATED_POWERS[min(7, max(0, power))]; | ||||||
| @@ -138,8 +138,8 @@ namespace bluetooth { | |||||||
|     /** |     /** | ||||||
|     * Stops advertising Eddystone end points |     * Stops advertising Eddystone end points | ||||||
|     */ |     */ | ||||||
|     //% blockId=eddystone_stop_advertising block="eddystone stop advertising" |     //% blockId=eddystone_stop_advertising block="stop advertising" | ||||||
|     //% parts=bluetooth |     //% parts=bluetooth weight=10 | ||||||
|     //% help=bluetooth/stop-advertising |     //% help=bluetooth/stop-advertising | ||||||
|     void stopAdvertising() { |     void stopAdvertising() { | ||||||
|         uBit.bleManager.stopAdvertising(); |         uBit.bleManager.stopAdvertising(); | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								libs/bluetooth/shims.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								libs/bluetooth/shims.d.ts
									
									
									
									
										vendored
									
									
								
							| @@ -86,16 +86,16 @@ declare namespace bluetooth { | |||||||
|      * @param url the url to transmit. Must be no longer than the supported eddystone url length |      * @param url the url to transmit. Must be no longer than the supported eddystone url length | ||||||
|      * @param power power level between 0 and 7, e.g.: 7 |      * @param power power level between 0 and 7, e.g.: 7 | ||||||
|      */ |      */ | ||||||
|     //% blockId=eddystone_advertise_url block="eddystone advertise url %url|power %powerLevel" |     //% blockId=eddystone_advertise_url block="advertise url %url|power %power" | ||||||
|     //% parts=bluetooth |     //% parts=bluetooth weight=11 | ||||||
|     //% help=bluetooth/advertise-url shim=bluetooth::advertiseUrl |     //% help=bluetooth/advertise-url shim=bluetooth::advertiseUrl | ||||||
|     function advertiseUrl(url: string, power: number): void; |     function advertiseUrl(url: string, power: number): void; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Stops advertising Eddystone end points |      * Stops advertising Eddystone end points | ||||||
|      */ |      */ | ||||||
|     //% blockId=eddystone_stop_advertising block="eddystone stop advertising" |     //% blockId=eddystone_stop_advertising block="stop advertising" | ||||||
|     //% parts=bluetooth |     //% parts=bluetooth weight=10 | ||||||
|     //% help=bluetooth/stop-advertising shim=bluetooth::stopAdvertising |     //% help=bluetooth/stop-advertising shim=bluetooth::stopAdvertising | ||||||
|     function stopAdvertising(): void; |     function stopAdvertising(): void; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user