Skip to content

Commit

Permalink
Add Perdo feed option
Browse files Browse the repository at this point in the history
  • Loading branch information
patates-cipsi418 committed Apr 23, 2024
1 parent e527e7b commit 5bf1846
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
Binary file added public/assets/PedroPedroPedro.mp4
Binary file not shown.
3 changes: 3 additions & 0 deletions src/renderer/components/Feed/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CameraFeed } from '@/renderer/components/Feed/Feeds/CameraFeed';
import { GraphFeed } from '@/renderer/components/Feed/Feeds/GraphFeed';
import { TextFeed } from '@/renderer/components/Feed/Feeds/TextFeed';
import { UrdfFeed } from '@/renderer/components/Feed/Feeds/UrdfFeed';
import { PedroFeed } from '@/renderer/components/Feed/Feeds/PedroFeed';
import { styled } from '@/renderer/globalStyles/styled';
import {
feedSlice,
Expand Down Expand Up @@ -62,6 +63,8 @@ const FeedView: FC<{
return <UrdfFeed feed={feed} />;
case FeedTypeEnum.Graph:
return <GraphFeed feed={feed} />;
case FeedTypeEnum.Pedro:
return <PedroFeed />;
default:
return <TextFeed text="NOT SUPPORTED" />;
}
Expand Down
14 changes: 14 additions & 0 deletions src/renderer/components/Feed/Feeds/PedroFeed.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

import { styled, css } from '@/renderer/globalStyles/styled';
import React, { FC } from 'react';

const StyledVideo = styled.video`
height: 100%;
width: 100%;
object-fit: contain;
overflow: hidden;
background: black;`

export const PedroFeed: FC = ()=>{
return <StyledVideo src="assets/PedroPedroPedro.mp4" autoPlay loop></StyledVideo>
}
8 changes: 4 additions & 4 deletions src/renderer/components/pages/Teleop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export const Teleop: FC = () => {
return (
<>
<FlipperInfoPanel />
<Feed feed_id={feed_id.teleop.main} defaultFeed="front_cam" />
<Feed feed_id={feed_id.teleop.main} defaultFeed="pedro" />
<StyledPIP left bottom>
<Feed feed_id={feed_id.teleop.bottom_left} defaultFeed="back_cam" />
<Feed feed_id={feed_id.teleop.bottom_left} defaultFeed="pedro" />
</StyledPIP>
<StyledPIP left top>
<Feed feed_id={feed_id.teleop.top_left} defaultFeed="empty" />
<Feed feed_id={feed_id.teleop.top_left} defaultFeed="pedro" />
</StyledPIP>
<StyledPIP right top>
<Feed feed_id={feed_id.teleop.top_right} defaultFeed="empty" />
<Feed feed_id={feed_id.teleop.top_right} defaultFeed="pedro" />
</StyledPIP>
</>
);
Expand Down
12 changes: 12 additions & 0 deletions src/renderer/store/modules/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export enum FeedTypeEnum {
Camera,
Urdf,
Graph,
Pedro,
NotSelected,
}

Expand All @@ -39,6 +40,7 @@ export type FeedType =
| ICameraFeed
| IUrdfFeed
| IGraphFeed
| IPedroFeed
| INotSelected;

interface BaseFeed {
Expand Down Expand Up @@ -81,6 +83,11 @@ export interface IGraphData {
name: string;
}

export interface IPedroFeed extends BaseFeed {
type: FeedTypeEnum.Pedro;
name: string;
}

export const feed_id = {
teleop: {
main: 'teleop_main',
Expand Down Expand Up @@ -196,6 +203,11 @@ export const initialState: FeedState = {
rotated: false,
},
},
pedro: {
type: FeedTypeEnum.Pedro,
id: 'pedro',
name: 'pedro'
}
},
};

Expand Down

0 comments on commit 5bf1846

Please sign in to comment.