Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ladislas/feature/fs vid git lfs #884

Merged
merged 3 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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