From 4e6f302150395b245e012b2ab0c1f7baedb24de9 Mon Sep 17 00:00:00 2001 From: anant-kaushik Date: Fri, 10 Dec 2021 16:27:51 -0500 Subject: [PATCH 1/3] Added make command to copy new binaries on vector --- Makefile | 8 ++++++++ README.md | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/Makefile b/Makefile index 951e2a5..5f97132 100644 --- a/Makefile +++ b/Makefile @@ -52,3 +52,11 @@ vic-gateway: go_deps --user $(UID):$(GID) \ armbuilder \ upx build/vic-gateway + +upload-on-vector: + @ssh root@$(ROBOT_IP) "mount -o remount,rw /" + @ssh root@$(ROBOT_IP) "systemctl stop vic-cloud" + @ssh root@$(ROBOT_IP) "systemctl stop vic-gateway" + @scp ./build/vic-cloud root@$(ROBOT_IP):/anki/bin/vic-cloud + @scp ./build/vic-gateway root@$(ROBOT_IP):/anki/bin/vic-gateway + @ssh root@$(ROBOT_IP) "systemctl daemon-reload" diff --git a/README.md b/README.md index ed51df1..e4afcb6 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,21 @@ To build vic-gateway, run... ``` # make vic-gateway ``` +## Development +If you have vector with ssh enabled you can you use the following to easily upload the +generated binaries. + +``` +# make upload-on-vector +``` + +The make command assumes that you have the robot ip saved under the ROBOT_IP, which is +a comman practise while developing on vector robots. If you dont have that setup you can +use the following. + +``` +# make upload-on-vector ROBOT_IP=192.168.65.97 +``` ## Example Customization From c6d7da29d46aff5b8b82a736856c1d1e521f4c04 Mon Sep 17 00:00:00 2001 From: anant-kaushik Date: Fri, 10 Dec 2021 16:28:07 -0500 Subject: [PATCH 2/3] Fixed broken link to check chipper connection --- internal/voice/stream/connect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/voice/stream/connect.go b/internal/voice/stream/connect.go index 771368f..37d721f 100644 --- a/internal/voice/stream/connect.go +++ b/internal/voice/stream/connect.go @@ -59,7 +59,7 @@ func (strm *Streamer) newChipperConn(ctx context.Context) (Conn, *CloudError) { }, } - otaURL = "https://" + config.Env.Check + suffix + otaURL = "http://" + config.Env.Check + suffix req, err = http.NewRequest("HEAD", otaURL, nil) if err != nil { log.Println("Error creating CDN server https head request:", err) From 076c485bdea15cdf1325f2b960e5ba52a2a13e1a Mon Sep 17 00:00:00 2001 From: Anant Kaushik <38720077+anant-kaushik@users.noreply.github.com> Date: Thu, 5 May 2022 16:20:50 -0400 Subject: [PATCH 3/3] Removed the proposed https: to http: change --- internal/voice/stream/connect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/voice/stream/connect.go b/internal/voice/stream/connect.go index 37d721f..771368f 100644 --- a/internal/voice/stream/connect.go +++ b/internal/voice/stream/connect.go @@ -59,7 +59,7 @@ func (strm *Streamer) newChipperConn(ctx context.Context) (Conn, *CloudError) { }, } - otaURL = "http://" + config.Env.Check + suffix + otaURL = "https://" + config.Env.Check + suffix req, err = http.NewRequest("HEAD", otaURL, nil) if err != nil { log.Println("Error creating CDN server https head request:", err)