From 1de77fc23e25eb10b4c9c8559c55c209b79d06e9 Mon Sep 17 00:00:00 2001 From: Yann Locatelli Date: Fri, 15 Mar 2024 20:32:19 +0100 Subject: [PATCH] AudioKit 440 test --- libs/BehaviorKit/source/BehaviorKit.cpp | 8 +++++++- libs/ReinforcerKit/source/ReinforcerKit.cpp | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/BehaviorKit/source/BehaviorKit.cpp b/libs/BehaviorKit/source/BehaviorKit.cpp index 23e98edb44..32c99ae432 100644 --- a/libs/BehaviorKit/source/BehaviorKit.cpp +++ b/libs/BehaviorKit/source/BehaviorKit.cpp @@ -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); } @@ -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(); @@ -57,6 +59,7 @@ void BehaviorKit::lowBattery() void BehaviorKit::mediumLowBattery() { + _audiokit.play("440"); _videokit.playVideoOnce(fs::home::vid::actions::robot_animation_action_yawning_no_eyebrows); } @@ -82,16 +85,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); } @@ -103,7 +109,7 @@ void BehaviorKit::working() void BehaviorKit::magicCardDetected() { - // nothing to do + _audiokit.play("440"); } void BehaviorKit::fileExchange() diff --git a/libs/ReinforcerKit/source/ReinforcerKit.cpp b/libs/ReinforcerKit/source/ReinforcerKit.cpp index 0b21c88c79..6e0b0f7809 100644 --- a/libs/ReinforcerKit/source/ReinforcerKit.cpp +++ b/libs/ReinforcerKit/source/ReinforcerKit.cpp @@ -51,6 +51,7 @@ 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(); }); @@ -58,6 +59,7 @@ void ReinforcerKit::playBlinkGreen() 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(); }); @@ -65,6 +67,7 @@ void ReinforcerKit::playSpinBlink() 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); @@ -72,6 +75,7 @@ void ReinforcerKit::playFire() 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); @@ -79,6 +83,7 @@ void ReinforcerKit::playSprinkles() 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);