You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/03/28 22:48:26 UTC

[2/2] incubator-mynewt-newtmgr git commit: nmxact - Fix example code.

nmxact - Fix example code.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/e234593a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/e234593a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/e234593a

Branch: refs/heads/master
Commit: e234593ab9ec122a77836c5c93930c771643168f
Parents: 501e31c
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 28 15:48:08 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:48:08 2017 -0700

----------------------------------------------------------------------
 nmxact/example/ble_plain/ble_plain.go       |  4 ++--
 nmxact/example/serial_plain/serial_plain.go | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e234593a/nmxact/example/ble_plain/ble_plain.go
----------------------------------------------------------------------
diff --git a/nmxact/example/ble_plain/ble_plain.go b/nmxact/example/ble_plain/ble_plain.go
index 44d0566..722083b 100644
--- a/nmxact/example/ble_plain/ble_plain.go
+++ b/nmxact/example/ble_plain/ble_plain.go
@@ -58,12 +58,12 @@ func main() {
 	sc.MgmtProto = sesn.MGMT_PROTO_NMP
 
 	sc.Ble.OwnAddrType = bledefs.BLE_ADDR_TYPE_RANDOM
-	sc.Ble.Peer = bledefs.BleDev{
+	sc.Ble.PeerSpec = sesn.BlePeerSpecDev(bledefs.BleDev{
 		AddrType: bledefs.BLE_ADDR_TYPE_PUBLIC,
 		Addr: bledefs.BleAddr{
 			Bytes: [6]byte{0x0b, 0x0a, 0x0b, 0x0a, 0x0b, 0x0a},
 		},
-	}
+	})
 
 	s, err := x.BuildSesn(sc)
 	if err != nil {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e234593a/nmxact/example/serial_plain/serial_plain.go
----------------------------------------------------------------------
diff --git a/nmxact/example/serial_plain/serial_plain.go b/nmxact/example/serial_plain/serial_plain.go
index 5b0c3b1..096c1c5 100644
--- a/nmxact/example/serial_plain/serial_plain.go
+++ b/nmxact/example/serial_plain/serial_plain.go
@@ -31,11 +31,11 @@ import (
 
 func main() {
 	// Initialize the serial transport.
-	cfg := nmserial.XportCfg{
-		DevPath:     "/dev/cu.usbserial-A600ANJ1",
-		Baud:        115200,
-		ReadTimeout: 3 * time.Second,
-	}
+	cfg := nmserial.NewXportCfg()
+	cfg.DevPath = "/dev/cu.usbserial-A600ANJ1"
+	cfg.Baud = 115200
+	cfg.ReadTimeout = 3 * time.Second
+
 	x := nmserial.NewSerialXport(cfg)
 
 	// Start the serial transport.