Skip to content

Commit

Permalink
MbitMoreDevice.cpp: CODAL Capacitative -> Resistive
Browse files Browse the repository at this point in the history
Hopefully will make pins resistive 

As I understand it should be the default, see
https://github.com/microsoft/pxt-microbit/blob/1a4af4035b92e0338345328d78f64e8934015cb8/libs/core/touchmode.cpp#L26
  • Loading branch information
DavidLeoni authored Aug 2, 2024
1 parent 5feadf6 commit 7eac5d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MbitMoreDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void MbitMoreDevice::onCommandReceived(uint8_t *data, size_t length) {
&MbitMoreDevice::onButtonChanged,
MESSAGE_BUS_LISTENER_QUEUE_IF_BUSY);
#if MICROBIT_CODAL
uBit.io.pin[pinIndex].isTouched(codal::TouchMode::Capacitative);
uBit.io.pin[pinIndex].isTouched(codal::TouchMode::Resistive);
#else // NOT MICROBIT_CODAL
uBit.io.pin[pinIndex].isTouched();
#endif // NOT MICROBIT_CODAL
Expand Down Expand Up @@ -961,4 +961,4 @@ bool MbitMoreDevice::isGpio(int pinIndex) {
return true;
}
return false;
}
}

0 comments on commit 7eac5d0

Please sign in to comment.