Skip to content

Commit

Permalink
fix exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kali committed Oct 3, 2022
1 parent fc97086 commit 51cf570
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bc_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,12 @@ void evTick (state_t* state)
if (animate(state)) { // true if edge of screen tapped
// https://pages.mtu.edu/~suits/notefreqs.html
int penta[5] = {554, 622, 740, 831, 932}; // notes in c# pentatonic scale
furi_hal_speaker_start(penta[rand() %5], 0.5);
furi_hal_speaker_start(penta[rand() %5], 0.5); // start playing a random note (from the list)

} else {
// The are 12 (state->fps) event ticks each second
// 1.000 / 12 = ~83mS ...That's a good length of time for a beep
// So we wil ljust turn the speaker OFF the tick after it starts
furi_hal_speaker_stop();
}

Expand Down Expand Up @@ -731,5 +735,5 @@ int32_t bc_demo (void)

INFO("CLEAN EXIT ... Exit code: %d", error);
LEAVE;
return (int32_t)(error ? 255 : 0); // It *seems* that the options are 0 for success, or 255 for failure
return (int32_t)error;
}

0 comments on commit 51cf570

Please sign in to comment.