-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from TheCacophonyProject/web-socket
Web socket
- Loading branch information
Showing
25 changed files
with
12,923 additions
and
444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ debug | |
/.vscode/ | ||
/dist/ | ||
/managementd | ||
api/types.js | ||
api/types.js.map | ||
static/js/camera.js | ||
static/js/camera.js.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,14 +7,21 @@ install-packr: | |
go install github.com/gobuffalo/packr/[email protected] | ||
|
||
.PHONY: build | ||
build: install-packr | ||
build: install-packr install-typescript | ||
packr build -ldflags="-s -w" ./cmd/managementd | ||
|
||
.PHONY: release | ||
release: install-packr | ||
|
||
.PHONY: install-typescript | ||
install-typescript: | ||
npm install -g typescript | ||
npm install -g rollup | ||
tsc | ||
|
||
.PHONY: release | ||
release: install-packr install-typescript | ||
curl -sL https://git.io/goreleaser | bash | ||
|
||
.PHONY: clean | ||
clean: | ||
packr clean | ||
rm managementd | ||
rm managementd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
export interface FrameInfo { | ||
Telemetry: Telemetry; | ||
AppVersion: string; | ||
BinaryVersion: string; | ||
Camera: CameraInfo; | ||
Tracks: Track[]; | ||
} | ||
|
||
export interface Track { | ||
predictions: Prediction[]; | ||
positions: Region[]; | ||
} | ||
|
||
export interface Prediction { | ||
label: string; | ||
confidence: number; | ||
clairty: number; | ||
} | ||
|
||
export interface Region { | ||
mass: number; | ||
frame_number: number; | ||
pixel_variance: number; | ||
x: number; | ||
y: number; | ||
width: number; | ||
height: number; | ||
} | ||
|
||
export interface Telemetry { | ||
TimeOn: number; | ||
FFCState: string; | ||
FrameCount: number; | ||
FrameMean: number; | ||
TempC: number; | ||
LastFFCTempC: number; | ||
LastFFCTime: number; | ||
} | ||
|
||
export interface CameraInfo { | ||
Brand: string; | ||
Model: string; | ||
FPS: number; | ||
ResX: number; | ||
ResY: number; | ||
Firmware: string; | ||
CameraSerial: number; | ||
} | ||
|
||
export interface Frame { | ||
frameInfo: FrameInfo; | ||
frame: Uint16Array; | ||
} | ||
|
||
interface CameraStats { | ||
skippedFramesServer: number; | ||
skippedFramesClient: number; | ||
} | ||
|
||
interface CameraState { | ||
socket: WebSocket | null; | ||
UUID: number; | ||
stats: CameraStats; | ||
prevFrameNum: number; | ||
heartbeatInterval: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.