Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Hexi_KW40Z Hexi_OLED_SSD1351
Revision 9:fe52fbcc6187, committed 2019-05-06
- Comitter:
- natasha41575
- Date:
- Mon May 06 05:29:48 2019 +0000
- Parent:
- 8:de0336411ac1
- Commit message:
- POTATO; ;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon May 06 05:09:55 2019 +0000
+++ b/main.cpp Mon May 06 05:29:48 2019 +0000
@@ -52,25 +52,19 @@
pc.printf("Right\r\n");
StartHaptic();
- kw40z_device.ToggleAdvertisementMode();
uint8_t buf[6] = "Right";
kw40z_device.SendMessage(buf, 5);
- kw40z_device.ToggleAdvertisementMode();
- kw40z_device.SendMessage(buf, 5);
}
void ButtonLeft(void)
{
pc.printf("Left\r\n");
StartHaptic();
-
- kw40z_device.ToggleAdvertisementMode();
+
uint8_t buf[6] = "Left";
kw40z_device.SendMessage(buf, 5);
- kw40z_device.ToggleAdvertisementMode();
- kw40z_device.SendMessage(buf, 5);
}
void PassKey(void)
@@ -131,6 +125,11 @@
kw40z_device.attach_passkey(&PassKey);
kw40z_device.attach_alert(&alertReceived);
+ while (kw40z_device.GetAdvertisementMode() != 0) {
+ kw40z_device.ToggleAdvertisementMode();
+ }
+
+
memset(text, 0, sizeof(char)*20);