Merge pull request #58 from jpoirier/development

shift direction fix
pull/67/head
cyoung 2015-09-24 00:53:08 -04:00
commit 84fb44f6b2
1 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -9,14 +9,16 @@ import (
"time"
"bufio"
"github.com/kidoman/embd"
_ "github.com/kidoman/embd/host/all"
"github.com/kidoman/embd/sensor/bmp180"
"github.com/tarm/serial"
"../mpu6050"
"os"
"os/exec"
"../mpu6050"
)
type SituationData struct {
@ -86,7 +88,7 @@ func makeUBXCFG(class, id byte, msglen uint16, msg []byte) []byte {
ret[2] = class
ret[3] = id
ret[4] = byte(msglen & 0xFF)
ret[5] = byte((msglen & 0xFF00) << 8)
ret[5] = byte((msglen >> 8) & 0xFF)
ret = append(ret, msg...)
chk := chksumUBX(ret[2:])
ret = append(ret, chk[0])
@ -147,9 +149,9 @@ func initGPSSerial() bool {
// Baud rate.
bdrt := uint32(115200)
cfg[8] = byte((bdrt & 0xFF000000) << 24)
cfg[9] = byte((bdrt & 0xFF0000) << 16)
cfg[10] = byte((bdrt & 0xFF00) << 8)
cfg[8] = byte((bdrt >> 24) & 0xFF)
cfg[9] = byte((bdrt >> 16) & 0xFF)
cfg[10] = byte((bdrt >> 8) & 0xFF)
cfg[11] = byte(bdrt & 0xFF)
// inProtoMask. NMEA and UBX.