fixed buzzer
This commit is contained in:
parent
b869baccc8
commit
c07f93fb7d
|
@ -60,7 +60,7 @@ void ioController::setActiveLED(bool pBool) {
|
||||||
|
|
||||||
void ioController::setBuzzer(bool pBool) {
|
void ioController::setBuzzer(bool pBool) {
|
||||||
//TODO needs testing
|
//TODO needs testing
|
||||||
if (pBool) {
|
if (!pBool) {
|
||||||
PORTB |= (1 << BUZZER); //ON
|
PORTB |= (1 << BUZZER); //ON
|
||||||
} else {
|
} else {
|
||||||
PORTB &= ~(1 << BUZZER); //OFF
|
PORTB &= ~(1 << BUZZER); //OFF
|
||||||
|
|
|
@ -24,6 +24,7 @@ int main(void) {
|
||||||
|
|
||||||
ioController io;
|
ioController io;
|
||||||
|
|
||||||
|
io.setBuzzer(false);
|
||||||
io.deactivateChargers();
|
io.deactivateChargers();
|
||||||
io.setActiveLED(true);
|
io.setActiveLED(true);
|
||||||
io.activateChargers();
|
io.activateChargers();
|
||||||
|
@ -32,6 +33,8 @@ int main(void) {
|
||||||
|
|
||||||
io.setWS2812(0, 255, 255);
|
io.setWS2812(0, 255, 255);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//loop till power off
|
//loop till power off
|
||||||
while (true) {
|
while (true) {
|
||||||
checkForBattery();
|
checkForBattery();
|
||||||
|
|
Loading…
Reference in New Issue