Skip to content

Commit

Permalink
🔀 Merge branch 'ladislas/feature/fs-vid-git-lfs' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Jun 15, 2022
2 parents 33eed18 + 552f1d2 commit 9205d9f
Show file tree
Hide file tree
Showing 30 changed files with 97 additions and 10 deletions.
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions fs/home/vid/emotions/robot-emotion-angry-no_eyebrows.avi
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions fs/home/vid/emotions/robot-emotion-happy-no_eyebrows.avi
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions fs/home/vid/system/robot-system-sleep-wake_up-no_eyebrows.avi
Git LFS file not shown
Git LFS file not shown
17 changes: 8 additions & 9 deletions libs/BehaviorKit/source/BehaviorKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ void BehaviorKit::launching()
void BehaviorKit::sleeping()
{
_ledkit.start(&LedKit::animation::sleeping);
_videokit.playVideoOnce("/fs/videos/2022_01_17-animation-face-state-yawning-sleeping_without_eyebrows.avi");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-sleep-yawn_then_sleep-no_eyebrows.avi");
}

void BehaviorKit::waiting()
{
_ledkit.stop();
_videokit.playVideoOnRepeat(
"/fs/videos/2022_02_14-animation-face-state-waiting-looking-top-right-to-left-without-eyebrows.avi");
_videokit.playVideoOnRepeat("/fs/home/vid/system/robot-system-idle-looking_top_right_left-no_eyebrows.avi");
}

void BehaviorKit::lowBattery()
Expand Down Expand Up @@ -79,7 +78,7 @@ void BehaviorKit::blinkGreen()
{
spinLeft(1);
_ledkit.start(&LedKit::animation::blink_green);
_videokit.playVideoOnce("/fs/videos/2022_02_14-animation-face-state-happy-without-eyebrows.avi");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi");
rtos::ThisThread::sleep_for(reinforcer_duration);
_ledkit.stop();
_motor_left.stop();
Expand All @@ -90,7 +89,7 @@ void BehaviorKit::spinBlink()
{
spinRight(1);
_ledkit.start(&LedKit::animation::spin_blink);
_videokit.playVideoOnce("/fs/videos/2022_02_14-animation-face-state-happy-without-eyebrows.avi");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi");
rtos::ThisThread::sleep_for(reinforcer_duration);
_ledkit.stop();
_motor_left.stop();
Expand All @@ -100,23 +99,23 @@ void BehaviorKit::spinBlink()
void BehaviorKit::fire()
{
_ledkit.start(&LedKit::animation::fire);
_videokit.playVideoOnce("/fs/videos/2022_02_14-animation-face-state-happy-without-eyebrows.avi");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi");
rtos::ThisThread::sleep_for(reinforcer_duration);
_ledkit.stop();
}

void BehaviorKit::sprinkles()
{
_ledkit.start(&LedKit::animation::sprinkles);
_videokit.playVideoOnce("/fs/videos/2022_02_14-animation-face-state-happy-without-eyebrows.avi");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi");
rtos::ThisThread::sleep_for(reinforcer_duration);
_ledkit.stop();
}

void BehaviorKit::rainbow()
{
_ledkit.start(&LedKit::animation::rainbow);
_videokit.playVideoOnce("/fs/videos/2022_02_14-animation-face-state-happy-without-eyebrows.avi");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-reinforcer-happy-no_eyebrows.avi");
rtos::ThisThread::sleep_for(reinforcer_duration);
_ledkit.stop();
}
Expand All @@ -125,7 +124,7 @@ void BehaviorKit::bleConnection(bool with_video)
{
_ledkit.start(&LedKit::animation::ble_connection);
if (with_video) {
_videokit.playVideoOnce("/fs/videos/2022_02_14-animation-face-action-wink-without-eyebrows.avi");
_videokit.playVideoOnce("/fs/home/vid/system/robot-system-ble_connection-wink-no_eyebrows.avi");
}
}

Expand Down
6 changes: 5 additions & 1 deletion spikes/lk_fs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ auto main() -> int
{
sd::init();

videokit.initializeScreen();
display::corelcd.turnOn();
videokit.initializeScreen();

rtos::ThisThread::sleep_for(1s);

Expand Down Expand Up @@ -138,8 +138,12 @@ auto main() -> int
}

if (path.string().ends_with(".avi")) {
videokit.displayImage("/fs/home/img/system/robot-misc-robot-misc-screen_empty_white.jpg");
rtos::ThisThread::sleep_for(5ms);
videokit.playVideoOnce(path);
rtos::ThisThread::sleep_for(3s);
videokit.stopVideo();
rtos::ThisThread::sleep_for(5ms);
com.write("ACK_VIDEO:" + path.string());
continue;
}
Expand Down

0 comments on commit 9205d9f

Please sign in to comment.