Skip to content

Commit

Permalink
add-p3-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Amerlander committed Apr 24, 2024
1 parent 8a065dd commit 7c7f16b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libs/scratch/MbitMoreCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ enum MbitMorePinEvent
*/
enum MbitMoreConfig
{
MIC = 0x01, // microphone
MICPIN = 0x01, // microphone
TOUCH = 0x02
};

Expand Down
2 changes: 1 addition & 1 deletion libs/scratch/MbitMoreDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ void MbitMoreDevice::onCommandReceived(uint8_t *data, size_t length) {
#endif // MICROBIT_CODAL
} else if (command == MbitMoreCommand::CMD_CONFIG) {
const int config = data[0] & 0b11111;
if (config == MbitMoreConfig::MIC) {
if (config == MbitMoreConfig::MICPIN) {
#if MICROBIT_CODAL
micInUse = ((data[1] == 1) ? true : false);
#endif // MICROBIT_CODAL
Expand Down
2 changes: 1 addition & 1 deletion libs/scratch/MbitMoreDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class MbitMoreDevice {
* @brief Pins which is pull-up at connected.
*
*/
int initialPullUp[3] = {0, 1, 2};
int initialPullUp[4] = {0, 1, 2, 3};

bool touchMode[3] = {false};

Expand Down
2 changes: 1 addition & 1 deletion libs/scratch/enums.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@

declare const enum MbitMoreConfig
{
MIC = 0x01,
MICPIN = 0x01,
TOUCH = 0x02,
}

Expand Down
2 changes: 1 addition & 1 deletion libs/scratch/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"pxt-calliopemini": "^6.0.31"
"pxt-calliopemini": "^5.0.10"
}
}

0 comments on commit 7c7f16b

Please sign in to comment.