fixed buzzer

This commit is contained in:
Hendrik Schutter 2018-11-24 15:27:14 +01:00
parent b869baccc8
commit c07f93fb7d
2 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,7 @@ void ioController::setActiveLED(bool pBool) {
void ioController::setBuzzer(bool pBool) {
//TODO needs testing
if (pBool) {
if (!pBool) {
PORTB |= (1 << BUZZER); //ON
} else {
PORTB &= ~(1 << BUZZER); //OFF

View File

@ -24,6 +24,7 @@ int main(void) {
ioController io;
io.setBuzzer(false);
io.deactivateChargers();
io.setActiveLED(true);
io.activateChargers();
@ -32,6 +33,8 @@ int main(void) {
io.setWS2812(0, 255, 255);
//loop till power off
while (true) {
checkForBattery();