kopia lustrzana https://github.com/cyoung/stratux
Merge pull request #337 from jpoirier/development
fix cb funct type arg count, circleci branch specific builds, move cgo flagpull/341/head
commit
bf86dc2ea3
|
@ -7,7 +7,7 @@ dependencies:
|
||||||
pre:
|
pre:
|
||||||
- sudo apt-get update; sudo apt-get install libusb-1.0-0-dev; cd ~/; git clone https://github.com/jpoirier/librtlsdr; cd librtlsdr; mkdir build; cd build; cmake ../; make; sudo make install; sudo ldconfig; cd ~/; mkdir gopath; cd ~/; mkdir gopath; wget https://storage.googleapis.com/golang/go1.6.src.tar.gz; tar -zxvf go1.6.src.tar.gz; cd go/src; export GOROOT_BOOTSTRAP=/usr/local/go; ./make.bash; echo $PATH; echo $GOPATH; go version; env
|
- sudo apt-get update; sudo apt-get install libusb-1.0-0-dev; cd ~/; git clone https://github.com/jpoirier/librtlsdr; cd librtlsdr; mkdir build; cd build; cmake ../; make; sudo make install; sudo ldconfig; cd ~/; mkdir gopath; cd ~/; mkdir gopath; wget https://storage.googleapis.com/golang/go1.6.src.tar.gz; tar -zxvf go1.6.src.tar.gz; cd go/src; export GOROOT_BOOTSTRAP=/usr/local/go; ./make.bash; echo $PATH; echo $GOPATH; go version; env
|
||||||
override:
|
override:
|
||||||
- cd .. ; rm -rf stratux ; git clone --recursive https://github.com/cyoung/stratux ; cd stratux ; make
|
- cd .. ; rm -rf stratux ; git clone --recursive https://github.com/cyoung/stratux ; cd stratux ; git fetch origin ; git checkout $CIRCLE_BRANCH ; make
|
||||||
|
|
||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
|
|
|
@ -28,7 +28,7 @@ package godump978
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../dump978/dump978.h"
|
#include "../dump978/dump978.h"
|
||||||
|
|
||||||
extern void dump978Cb(char updown, uint8_t *data, int len);
|
extern void dump978Cb(char updown, uint8_t *data, int len, int rs_errors, int signal_strength);
|
||||||
static inline CallBack GetGoCb() {
|
static inline CallBack GetGoCb() {
|
||||||
return (CallBack)dump978Cb;
|
return (CallBack)dump978Cb;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ var PackageVersion = "v0.1"
|
||||||
// InChan is a buffered input channel for raw data.
|
// InChan is a buffered input channel for raw data.
|
||||||
var InChan = make(chan []byte, 100)
|
var InChan = make(chan []byte, 100)
|
||||||
|
|
||||||
type UserCbT func(C.char, *C.uint8_t, C.int)
|
type UserCbT func(C.char, *C.uint8_t, C.int, C.int, C.int)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
C.Dump978Init((C.CallBack)(C.GetGoCb()))
|
C.Dump978Init((C.CallBack)(C.GetGoCb()))
|
||||||
|
|
|
@ -12,9 +12,10 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
// #cgo CFLAGS: -L../
|
|
||||||
/*
|
/*
|
||||||
|
#cgo CFLAGS: -L../
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../dump978/dump978.h"
|
#include "../dump978/dump978.h"
|
||||||
*/
|
*/
|
||||||
|
|
Ładowanie…
Reference in New Issue