Merge branch 'release/v0.0.9'
This commit is contained in:
+3
-3
@@ -24,7 +24,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- OOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o tele-recv-linux
|
- OOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o tele-recv-linux
|
||||||
- GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build -o tele-recv-win64.exe
|
- GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build -o tele-recv-win64.exe
|
||||||
- tar cvzf tele-recv-0.0.7.tar.gz tele-recv-linux tele-recv-win64.exe telegram.yaml
|
- tar cvzf tele-recv-0.0.9.tar.gz tele-recv-linux tele-recv-win64.exe telegram.yaml
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
@@ -34,9 +34,9 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
api_key: fe1e1a8dd77de7452a3f473984c7ac6fe6c5abaf
|
api_key: fe1e1a8dd77de7452a3f473984c7ac6fe6c5abaf
|
||||||
base_url: https://gitea.int.it2000.com.cn
|
base_url: https://gitea.int.it2000.com.cn
|
||||||
title: 0.0.7
|
title: 0.0.9
|
||||||
files:
|
files:
|
||||||
- tele-recv-0.0.7.tar.gz
|
- tele-recv-0.0.8.tar.gz
|
||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
when:
|
when:
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@ func start() {
|
|||||||
for utils.ServerRunning {
|
for utils.ServerRunning {
|
||||||
if !utils.IsPortOpen() {
|
if !utils.IsPortOpen() {
|
||||||
logger.Info("try to open port")
|
logger.Info("try to open port")
|
||||||
err := utils.OpenPort(device, baudrate, bytesize, stopbits)
|
err := utils.OpenPort(device, baudrate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Fatal("error in open serial port ", zap.Error(err))
|
logger.Fatal("error in open serial port ", zap.Error(err))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ Test load sqlite database and init table`,
|
|||||||
|
|
||||||
func test() {
|
func test() {
|
||||||
logger.Info("Testing environment")
|
logger.Info("Testing environment")
|
||||||
_ = utils.OpenPort(device, baudrate, bytesize, stopbits)
|
_ = utils.OpenPort(device, baudrate)
|
||||||
|
|
||||||
err := utils.InitDb(dbFile, dbInit)
|
err := utils.InitDb(dbFile, dbInit)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ var (
|
|||||||
const readDuration = 500 * time.Millisecond
|
const readDuration = 500 * time.Millisecond
|
||||||
|
|
||||||
// OpenPort open serial port
|
// OpenPort open serial port
|
||||||
func OpenPort(device string, baudrate int, bytesize byte, stopbits byte) error {
|
func OpenPort(device string, baudrate int) error {
|
||||||
Log.Info("opening serial device ",
|
Log.Info("opening serial device ",
|
||||||
zap.String("port", device),
|
zap.String("port", device),
|
||||||
zap.Int("baudrate", baudrate))
|
zap.Int("baudrate", baudrate))
|
||||||
|
|||||||
Reference in New Issue
Block a user