Skip to content

Commit

Permalink
add force push button
Browse files Browse the repository at this point in the history
  • Loading branch information
Techno11 committed Sep 25, 2024
1 parent c6b0186 commit 03f1c73
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 44 deletions.
8 changes: 7 additions & 1 deletion front-end/src/api/use-socket.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 +212,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 03f1c73

Please sign in to comment.