Skip to content

Commit

Permalink
AudioKit 440 test
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Mar 18, 2024
1 parent 75d3ab3 commit b69a022
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libs/BehaviorKit/source/BehaviorKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ void BehaviorKit::spinRight(float speed)

void BehaviorKit::launching()
{
_audiokit.play("440");
_videokit.displayImage(fs::home::img::system::robot_misc_splash_screen_large_400);
}

Expand All @@ -49,6 +50,7 @@ void BehaviorKit::blinkOnCharge()

void BehaviorKit::lowBattery()
{
_audiokit.play("440");
_ledkit.stop();
_videokit.displayImage(fs::home::img::system::robot_battery_empty_must_be_charged);
_motor_left.stop();
Expand Down Expand Up @@ -77,16 +79,19 @@ void BehaviorKit::chargingHigh()

void BehaviorKit::chargingFull()
{
_audiokit.play("440");
_videokit.displayImage(fs::home::img::system::robot_battery_charging_quarter_4_green);
}

void BehaviorKit::bleConnectionWithoutVideo()
{
_audiokit.play("440");
_ledkit.start(&led::animation::ble_connection);
}

void BehaviorKit::bleConnectionWithVideo()
{
_audiokit.play("440");
_ledkit.start(&led::animation::ble_connection);
_videokit.playVideoOnce(fs::home::vid::system::robot_system_ble_connection_wink_no_eyebrows);
}
Expand All @@ -98,7 +103,7 @@ void BehaviorKit::working()

void BehaviorKit::magicCardDetected()
{
// nothing to do
_audiokit.play("440");
}

void BehaviorKit::fileExchange()
Expand Down
5 changes: 5 additions & 0 deletions libs/ReinforcerKit/source/ReinforcerKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,34 +51,39 @@ void ReinforcerKit::stop()

void ReinforcerKit::playBlinkGreen()
{
_audiokit.play("440");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi");
_ledkit.start(&led::animation::blink_green);
_motionkit.startYawRotation(kThreeTurnDegrees, Rotation::clockwise, [this] { _ledkit.stop(); });
}

void ReinforcerKit::playSpinBlink()
{
_audiokit.play("440");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi");
_ledkit.start(&led::animation::spin_blink);
_motionkit.startYawRotation(kThreeTurnDegrees, Rotation::counterClockwise, [this] { _ledkit.stop(); });
}

void ReinforcerKit::playFire()
{
_audiokit.play("440");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi",
[this] { _ledkit.stop(); });
_ledkit.start(&led::animation::fire);
}

void ReinforcerKit::playSprinkles()
{
_audiokit.play("440");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi",
[this] { _ledkit.stop(); });
_ledkit.start(&led::animation::sprinkles);
}

void ReinforcerKit::playRainbow()
{
_audiokit.play("440");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi",
[this] { _ledkit.stop(); });
_ledkit.start(&led::animation::rainbow);
Expand Down

0 comments on commit b69a022

Please sign in to comment.