Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different serial libraries used in multiple places in the code #37

Open
DanielJoyce opened this issue Apr 27, 2017 · 4 comments
Open

Different serial libraries used in multiple places in the code #37

DanielJoyce opened this issue Apr 27, 2017 · 4 comments

Comments

@DanielJoyce
Copy link

DanielJoyce commented Apr 27, 2017

Which should be used?

For example, seriallist.go has the following

import (
	//"fmt"
	//"github.com/lxn/win"
	//"github.com/mattn/go-ole"
	//"github.com/mattn/go-ole/oleutil"
	"github.com/go-ole/go-ole"
	"github.com/go-ole/go-ole/oleutil"
	//"github.com/tarm/goserial"
	//"github.com/johnlauer/goserial"
	"log"
	"os"
	"strings"

	"github.com/facchinm/go-serial"
	//"encoding/binary"
	"strconv"
	"sync"
	//"syscall"
	"regexp"
)

while serialport.go has

import (
	"bytes"
	"encoding/json"
	"encoding/base64"
	"sync"

	"github.com/johnlauer/goserial"
	//"github.com/facchinm/go-serial"
	"io"
	"log"
	"strconv"
	"strings"
	"time"
)

Which is it, "github.com/johnlauer/goserial" or "github.com/facchinm/go-serial" ?

A couple other files have this problem too.

@chilipeppr
Copy link
Owner

chilipeppr commented Apr 27, 2017 via email

@DanielJoyce
Copy link
Author

Neither apply cleanly in all cases. :P It seems feature sets have diverged and it also seems unwise to be using two serial port libraries.

@DanielJoyce
Copy link
Author

DanielJoyce commented Apr 27, 2017

When I try and replace all occurences of "github.com/facchinm/go-serial" with johnlauer/goserial I get the following build error

./programmer.go:373: undefined: serial.Mode
./programmer.go:378: too many arguments in call to serial.OpenPort
        have (string, <T>)
        want (*serial.Config)
./programmer.go:400: undefined: serial.GetPortsList
./programmer.go:404: undefined: serial.GetPortsList
./programmer.go:438: undefined: serial.Mode
./programmer.go:443: too many arguments in call to serial.OpenPort
        have (string, <T>)
        want (*serial.Config)
./seriallist.go:32: undefined: serial.GetPortsList

@chilipeppr
Copy link
Owner

chilipeppr commented Apr 27, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants