Skip to content

Commit

Permalink
Ver 0.01.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sdurnev committed Dec 29, 2019
1 parent 74a6a80 commit 4df4f08
Show file tree
Hide file tree
Showing 20 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .idea/runConfigurations/Build_all.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/jan_modbus_tcp_linux.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/jan_modbus_tcp_macos.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/jan_modbus_tcp_rpi.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/jan_modbus_tcp_windows.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed bin/0.01.4/linux/jan_modbus_tcp_x64_linux
Binary file not shown.
Binary file removed bin/0.01.4/macos/jan_modbus_tcp_macos
Binary file not shown.
Binary file removed bin/0.01.4/rpi/jan_modbus_tcp_rpi_linux
Binary file not shown.
Binary file removed bin/0.01.4/win/jan_modbus_tcp_windows.exe
Binary file not shown.
Binary file removed bin/0.01.5/linux/jan_modbus_tcp_linux_linux
Binary file not shown.
Binary file removed bin/0.01.5/macos/jan_modbus_tcp_macos_darwin
Binary file not shown.
Binary file removed bin/0.01.5/rpi/jan_modbus_tcp_rpi_linux
Binary file not shown.
Binary file removed bin/0.01.5/win/jan_modbus_tcp_windows.exe
Binary file not shown.
Binary file removed bin/build_linux_x64_linux
Binary file not shown.
Binary file removed bin/build_macos
Binary file not shown.
Binary file removed bin/build_rpi_linux
Binary file not shown.
Binary file removed bin/jan_modbus_ip_mac_0.01.2
Binary file not shown.
Binary file removed bin/jan_modbus_ip_mac_0.01.3
Binary file not shown.
Binary file removed bin/jan_modbus_ip_rpi_0.01.3
Binary file not shown.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
!!!!!!!!!!!! VERSION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
const version = "0.01.5"
const version = "0.01.6"

/*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down Expand Up @@ -108,9 +108,9 @@ func main() {
defer handler.Close()
client := modbus.NewClient(handler)

results, err := client.ReadInputRegisters(19000, uint16(*regQuantity)*2)
results, err := client.ReadHoldingRegisters(19000, uint16(*regQuantity)*2)
if err != nil {
fmt.Printf("{\"status\":\"error\", \"error\":\"%s\"}", err)
fmt.Printf("{\"status\":\"error\", \"error\":\"%s\", \"version\": \"%s\"}", err, version)
//fmt.Printf("%s\n", err)
}

Expand All @@ -129,14 +129,14 @@ func main() {

for l := 0; l < len(data); l++ {
if l == 0 {
fmt.Printf("{ \"%s\": ", paramName[l])
fmt.Printf("{\"%s\":", paramName[l])
} else {
fmt.Printf(", \"%s\": ", paramName[l])
fmt.Printf(",\"%s\":", paramName[l])
}
fmt.Print(data[l])
}
if len(results) != 0 {
fmt.Printf(", \"version\": \"%s\"}", version)
fmt.Printf(",\"version\":\"%s\"}", version)
}
}

Expand Down

0 comments on commit 4df4f08

Please sign in to comment.