Skip to content

Commit

Permalink
Bugfix minor errors in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
finneyj committed Nov 28, 2024
1 parent 8345d46 commit cdb033a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion model/MicroBit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ int MicroBit::init()
// before any user code begins running.

sleep(10);

return DEVICE_OK;
}

Expand Down
7 changes: 6 additions & 1 deletion source/MicroBitAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ MicroBitAudio::MicroBitAudio(NRF52Pin &pin, NRF52Pin &speaker, NRF52ADC &adc, NR
void MicroBitAudio::periodicCallback()
{
if (mic->isEnabled() && !micEnabled)
{
DMESG("MicroBitAudio::periodicCallback: activateMic()...");
activateMic();
}

if (!mic->isEnabled() && micEnabled)
{
DMESG("MicroBitAudio::periodicCallback: deactivateMic()...");
deactivateMic();
}
}

void MicroBitAudio::activateMic(){
Expand All @@ -106,7 +112,6 @@ void MicroBitAudio::activateMic(){

void MicroBitAudio::deactivateMic(){
this->micEnabled = false;
//mic->disable();
runmic.setDigitalValue(0);
runmic.setHighDrive(false);
}
Expand Down

0 comments on commit cdb033a

Please sign in to comment.