Skip to content

Commit

Permalink
Merge pull request #165 from the-orange-alliance/force-release-food
Browse files Browse the repository at this point in the history
Add Force Release for Food
  • Loading branch information
kyle-flynn authored Sep 26, 2024
2 parents 2b776d6 + 5e3fddf commit 730e1e1
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 44 deletions.
13 changes: 12 additions & 1 deletion front-end/src/api/use-socket.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { createSocket } from '@toa-lib/client';
import { Match, MatchKey, MatchSocketEvent } from '@toa-lib/models';
import {
FieldControlUpdatePacket,
Match,
MatchKey,
MatchSocketEvent
} from '@toa-lib/models';
import { Socket } from 'socket.io-client';
import { useRecoilCallback, useRecoilState } from 'recoil';

Expand Down Expand Up @@ -212,4 +217,10 @@ export async function sendUpdateFrcFmsSettings(
socket?.emit('frc-fms:settings-update', { hwFingerprint });
}

export async function sendFCSPacket(
packet: FieldControlUpdatePacket
): Promise<void> {
socket?.emit('fcs:update', packet);
}

export default socket;
Loading

0 comments on commit 730e1e1

Please sign in to comment.