Skip to content

Commit e025b88

Browse files
committed
Support linux_arm
1 parent 815fd78 commit e025b88

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

info.go

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package main
22

33
import (
4-
"log"
5-
64
"github.com/facchinm/go-serial"
75
"github.com/facchinm/systray"
86
"github.com/gin-gonic/gin"
@@ -26,7 +24,6 @@ func pauseHandler(c *gin.Context) {
2624
}
2725
systray.Quit()
2826
*hibernate = true
29-
log.Println("Restart becayse setup went wrong?")
3027
restart("")
3128
}()
3229
c.JSON(200, nil)

info_linux_arm.go

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package main
2+
3+
import (
4+
"github.com/facchinm/go-serial"
5+
"github.com/gin-gonic/gin"
6+
)
7+
8+
func infoHandler(c *gin.Context) {
9+
c.JSON(200, gin.H{
10+
"version": version,
11+
"http": "http://localhost" + port,
12+
"https": "https://localhost" + portSSL,
13+
"ws": "ws://localhost" + port,
14+
"wss": "wss://localhost" + portSSL,
15+
})
16+
}
17+
18+
func pauseHandler(c *gin.Context) {
19+
go func() {
20+
ports, _ := serial.GetPortsList()
21+
for _, element := range ports {
22+
spClose(element)
23+
}
24+
*hibernate = true
25+
restart("")
26+
}()
27+
c.JSON(200, nil)
28+
}

0 commit comments

Comments
 (0)