Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change usage of uBit.io.face with uBit.io.logo. #85

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/samples/CapTouchTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ static void onTouchP2(MicroBitEvent e)
{
DMESG("TOUCH: P2");
}
static void onTouchFace(MicroBitEvent e)
static void onTouchLogo(MicroBitEvent e)
{
DMESG("TOUCH: FACE");
DMESG("TOUCH: LOGO");
}

void
Expand All @@ -139,7 +139,7 @@ cap_touch_test()
uBit.messageBus.listen(MICROBIT_ID_IO_P0, MICROBIT_BUTTON_EVT_CLICK, onTouchP0);
uBit.messageBus.listen(MICROBIT_ID_IO_P1, MICROBIT_BUTTON_EVT_CLICK, onTouchP1);
uBit.messageBus.listen(MICROBIT_ID_IO_P2, MICROBIT_BUTTON_EVT_CLICK, onTouchP2);
uBit.messageBus.listen(MICROBIT_ID_FACE, MICROBIT_BUTTON_EVT_CLICK, onTouchFace);
uBit.messageBus.listen(MICROBIT_ID_LOGO, MICROBIT_BUTTON_EVT_CLICK, onTouchLogo);

while(1)
{
Expand Down
10 changes: 5 additions & 5 deletions source/samples/OOB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,8 @@ void clap() {
mode++;
}

void onFacePalm(MicroBitEvent e) {
uBit.serial.printf("face palm \r\n");
void onLogoTouch(MicroBitEvent e) {
uBit.serial.printf("logo touch \r\n");
mute = !mute;
}

Expand All @@ -865,9 +865,9 @@ out_of_box_experience_v2()

create_fiber(playback_ticker);

/* Disable face touch to mute
uBit.io.face.isTouched();
uBit.messageBus.listen(uBit.io.face.id, MICROBIT_BUTTON_EVT_CLICK, onFacePalm);
/* Disable logo touch to mute
uBit.io.logo.isTouched();
uBit.messageBus.listen(uBit.io.logo.id, MICROBIT_BUTTON_EVT_CLICK, onLogoTouch);
*/

mode = WAKE;
Expand Down
Loading