Skip to content

Commit

Permalink
Change usage of 'uBit.io.face' with 'uBit.io.logo'. (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos authored Feb 28, 2024
1 parent b528bfa commit 1a3d477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
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

0 comments on commit 1a3d477

Please sign in to comment.