Skip to content

Commit

Permalink
Minor fixes for alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
mame82 committed Dec 6, 2018
1 parent a585a39 commit 74a373f
Show file tree
Hide file tree
Showing 46 changed files with 83 additions and 209 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ dep:
#go get -u github.com/gorilla/websocket

compile:
go get -u github.com/mame82/P4wnP1_go/... # partially downloads again, but we need the library packages in go path to build
go get -u github.com/mame82/P4wnP1_aloa/... # partially downloads again, but we need the library packages in go path to build
# <--- second compilation, maybe -d flag on go get above is better
env GOBIN=$(CURDIR)/build go install ./cmd/... # compile all main packages to the build folder

# compile the web app
# ToDo: (check if dependencies have been fetched by 'go get', even with the build js tags)
$(HOME)/go/bin/gopherjs get github.com/mame82/P4wnP1_go/web_client/...
$(HOME)/go/bin/gopherjs get github.com/mame82/P4wnP1_aloa/web_client/...
$(HOME)/go/bin/gopherjs build -m -o build/webapp.js web_client/*.go

installkali:
Expand Down
4 changes: 2 additions & 2 deletions cli_client/cmd_hid.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli_client

import (
"context"
"github.com/mame82/P4wnP1_go/common"
"github.com/mame82/P4wnP1_aloa/common"
"github.com/spf13/cobra"
"fmt"
"path/filepath"
Expand All @@ -13,7 +13,7 @@ import (
"errors"
"log"
"strconv"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cli_client/cmd_led.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/spf13/cobra"
"os"

pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
"fmt"
"log"
)
Expand Down
6 changes: 3 additions & 3 deletions cli_client/cmd_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package cli_client

import (
"github.com/spf13/cobra"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
"net"
"errors"
"fmt"
"google.golang.org/grpc/status"
//"github.com/mame82/P4wnP1_go/service"
//"github.com/mame82/P4wnP1_aloa/service"
"strings"
"strconv"
"github.com/mame82/P4wnP1_go/common_web"
"github.com/mame82/P4wnP1_aloa/common_web"
)

//Empty settings used to store cobra flags
Expand Down
2 changes: 1 addition & 1 deletion cli_client/cmd_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli_client

import (
"fmt"
"github.com/mame82/P4wnP1_go/common_web"
"github.com/mame82/P4wnP1_aloa/common_web"
"os"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cli_client/cmd_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli_client

import (
"fmt"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cli_client/cmd_usb_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cli_client
import (
"encoding/json"
"fmt"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
"github.com/spf13/cobra"
"log"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cli_client/cmd_wifi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli_client

import (
"github.com/spf13/cobra"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
"fmt"
"google.golang.org/grpc/status"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cli_client/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli_client

import (
"fmt"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
"errors"
"context"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion cmd/P4wnP1_cli/P4wnP1_cli.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/mame82/P4wnP1_go/cli_client"
"github.com/mame82/P4wnP1_aloa/cli_client"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/P4wnP1_service/P4wnP1_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ package main

import (
"fmt"
"github.com/mame82/P4wnP1_go/common_web"
"github.com/mame82/P4wnP1_go/service"
"github.com/mame82/P4wnP1_aloa/common_web"
"github.com/mame82/P4wnP1_aloa/service"
"log"
"os"
"os/signal"
Expand Down
2 changes: 1 addition & 1 deletion cmd/testhid/testhid.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package main

import(
"github.com/mame82/P4wnP1_go/hid"
"github.com/mame82/P4wnP1_aloa/hid"

"log"
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion common_web/Globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ const (
MAJOR = 0
MINOR = 1
PATCH = 0
SUFFIX = "-alpha1"
SUFFIX = "-alpha2"
VERSION = "v0.1.0"+SUFFIX
)
Binary file modified dist/db/init.db
Binary file not shown.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/mame82/P4wnP1_go
module github.com/mame82/P4wnP1_aloa

require (
github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7 // indirect
Expand Down
2 changes: 1 addition & 1 deletion mgenetlink/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mgenetlink

import (
nl "github.com/mame82/P4wnP1_go/mnetlink"
nl "github.com/mame82/P4wnP1_aloa/mnetlink"
"errors"
"golang.org/x/sys/unix"
"log"
Expand Down
2 changes: 1 addition & 1 deletion mgenetlink/common.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package mgenetlink

import "github.com/mame82/P4wnP1_go/mnetlink"
import "github.com/mame82/P4wnP1_aloa/mnetlink"

var hbo = mnetlink.Hbo()
2 changes: 1 addition & 1 deletion mgenetlink/family.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mgenetlink
import (
"errors"
"fmt"
"github.com/mame82/P4wnP1_go/mnetlink"
"github.com/mame82/P4wnP1_aloa/mnetlink"
"golang.org/x/sys/unix"
)

Expand Down
2 changes: 1 addition & 1 deletion mgenetlink/mcast_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mgenetlink

import (
"fmt"
"github.com/mame82/P4wnP1_go/mnetlink"
"github.com/mame82/P4wnP1_aloa/mnetlink"
"errors"
"golang.org/x/sys/unix"
)
Expand Down
2 changes: 1 addition & 1 deletion mgenetlink/message.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mgenetlink

import (
"github.com/mame82/P4wnP1_go/mnetlink"
"github.com/mame82/P4wnP1_aloa/mnetlink"
"golang.org/x/sys/unix"
"errors"
)
Expand Down
2 changes: 1 addition & 1 deletion mgenetlink/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package mgenetlink

import (
"fmt"
"github.com/mame82/P4wnP1_go/mnetlink"
"github.com/mame82/P4wnP1_aloa/mnetlink"
"golang.org/x/sys/unix"
)

Expand Down
6 changes: 3 additions & 3 deletions service/Event.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package service
import (
"context"
"fmt"
"github.com/mame82/P4wnP1_go/common_web"
"github.com/mame82/P4wnP1_go/hid"
pb "github.com/mame82/P4wnP1_go/proto"
"github.com/mame82/P4wnP1_aloa/common_web"
"github.com/mame82/P4wnP1_aloa/hid"
pb "github.com/mame82/P4wnP1_aloa/proto"
"log"
"sync"
"time"
Expand Down
4 changes: 2 additions & 2 deletions service/SubSysGpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package service
import (
"context"
"fmt"
"github.com/mame82/P4wnP1_go/service/pgpio"
"github.com/mame82/P4wnP1_aloa/service/pgpio"
"periph.io/x/periph"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/gpio/gpioreg"
Expand All @@ -15,7 +15,7 @@ import (
"sync"
"time"
"errors"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion service/SubSysLED.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package service

import (
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
"io/ioutil"
"log"
"os"
Expand Down
6 changes: 3 additions & 3 deletions service/SubSysNetworkManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"errors"
"fmt"
//"github.com/docker/libcontainer/netlink"
"github.com/mame82/P4wnP1_go/netlink"
pb "github.com/mame82/P4wnP1_go/proto"
"github.com/mame82/P4wnP1_go/service/util"
"github.com/mame82/P4wnP1_aloa/netlink"
pb "github.com/mame82/P4wnP1_aloa/proto"
"github.com/mame82/P4wnP1_aloa/service/util"
"io/ioutil"
"log"
"net"
Expand Down
8 changes: 4 additions & 4 deletions service/SubSysTriggerAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"context"
"errors"
"fmt"
"github.com/mame82/P4wnP1_go/common"
"github.com/mame82/P4wnP1_go/common_web"
pb "github.com/mame82/P4wnP1_go/proto"
"github.com/mame82/P4wnP1_go/service/util"
"github.com/mame82/P4wnP1_aloa/common"
"github.com/mame82/P4wnP1_aloa/common_web"
pb "github.com/mame82/P4wnP1_aloa/proto"
"github.com/mame82/P4wnP1_aloa/service/util"
"io/ioutil"
"sync"
)
Expand Down
6 changes: 3 additions & 3 deletions service/SubSysUSB.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"context"
"errors"
"fmt"
"github.com/mame82/P4wnP1_go/common"
"github.com/mame82/P4wnP1_go/hid"
pb "github.com/mame82/P4wnP1_go/proto"
"github.com/mame82/P4wnP1_aloa/common"
"github.com/mame82/P4wnP1_aloa/hid"
pb "github.com/mame82/P4wnP1_aloa/proto"
"io/ioutil"
"log"
"net"
Expand Down
10 changes: 8 additions & 2 deletions service/bluetooth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ package service
import (
"errors"
"fmt"
pb "github.com/mame82/P4wnP1_go/proto"
"github.com/mame82/P4wnP1_go/service/bluetooth"
pb "github.com/mame82/P4wnP1_aloa/proto"
"github.com/mame82/P4wnP1_aloa/service/bluetooth"
"github.com/mame82/mblue-toolz/toolz"
"io/ioutil"
"log"
"os"
"os/exec"
"regexp"
"strconv"
Expand Down Expand Up @@ -493,6 +495,10 @@ func (bt *BtService) EnableBridge() (err error) {
log.Println("... reconfigure ethernet settings for interface", bt.BrName)
if mi, err := bt.RootSvc.SubSysNetwork.GetManagedInterface(bt.BrName); err == nil {
mi.ReDeploy()
// disable IPv6 for bridge interface
//ioutil.WriteFile("/proc/sys/net/ipv6/conf/" + bt.BrName + "/disable_ipv6", []byte("1"), os.ModePerm)
// disable IPv6 for all interfaces
ioutil.WriteFile("/proc/sys/net/ipv6/conf/all/disable_ipv6", []byte("1"), os.ModePerm)
}


Expand Down
4 changes: 2 additions & 2 deletions service/bluetooth/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"sync"
"time"

//"github.com/mame82/P4wnP1_go/service"
//"github.com/mame82/P4wnP1_aloa/service"
"github.com/mame82/mblue-toolz/btmgmt"
"github.com/mame82/mblue-toolz/dbusHelper"
"github.com/mame82/mblue-toolz/toolz"
"errors"
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"

)

Expand Down
2 changes: 1 addition & 1 deletion service/defaults.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package service

import (
pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions service/dhcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"bytes"
"errors"
"fmt"
"github.com/mame82/P4wnP1_go/common_web"
pb "github.com/mame82/P4wnP1_go/proto"
"github.com/mame82/P4wnP1_aloa/common_web"
pb "github.com/mame82/P4wnP1_aloa/proto"
"io/ioutil"
"log"
"net"
Expand Down
6 changes: 3 additions & 3 deletions service/dwc2_connect_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package service
import (
"fmt"
"errors"
"github.com/mame82/P4wnP1_go/common_web"
"github.com/mame82/P4wnP1_aloa/common_web"

genl "github.com/mame82/P4wnP1_go/mgenetlink"
nl "github.com/mame82/P4wnP1_go/mnetlink"
genl "github.com/mame82/P4wnP1_aloa/mgenetlink"
nl "github.com/mame82/P4wnP1_aloa/mnetlink"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion service/led.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import(
"time"
"sync/atomic"

pb "github.com/mame82/P4wnP1_go/proto"
pb "github.com/mame82/P4wnP1_aloa/proto"
)

const (
Expand Down
Loading

0 comments on commit 74a373f

Please sign in to comment.