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

Cfg start and trigger time switched? #1

Open
drewsilcock opened this issue Mar 12, 2021 · 0 comments
Open

Cfg start and trigger time switched? #1

drewsilcock opened this issue Mar 12, 2021 · 0 comments

Comments

@drewsilcock
Copy link

Hi there, looking at the parsing code it looks like the start time and trigger times are being switched (unless I'm missing something). The spec puts the start time first and the trigger time second which matches the variable name, but they're assigned the other way around.

comgo.go:596

	// Read start date and time ([dd,mm,yyyy,hh,mm,ss.ssssss])
	tempList = bytes.Split(lines[4+cfg.GetSampleRateNum()+chA.GetChannelTotal()+chD.GetChannelTotal()], []byte(","))
	if start, err := time.Parse(TimeFormat, ByteToString(bytes.Join(tempList, []byte("T")))); err != nil {
		return err
	} else {
		cfg.TriggerTime = start
	}

	// Read trigger date and time ([dd,mm,yyyy,hh,mm,ss.ssssss])
	tempList = bytes.Split(lines[5+cfg.GetSampleRateNum()+chA.GetChannelTotal()+chD.GetChannelTotal()], []byte(","))
	if trigger, err := time.Parse(TimeFormat, ByteToString(bytes.Join(tempList, []byte("T")))); err != nil {
		return err
	} else {
		cfg.StartTime = trigger
	}
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

1 participant