-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added demo application GUI - changed Bluetooth toggle from power to enable
- Loading branch information
1 parent
73286f4
commit 90644e0
Showing
21 changed files
with
580 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
BeeTee Demo/Assets.xcassets/DeviceListing.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "noun_18353-2.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "noun_18353-1.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "noun_18353.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+900 Bytes
BeeTee Demo/Assets.xcassets/DeviceListing.imageset/noun_18353-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
BeeTee Demo/Assets.xcassets/MissionControl.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "noun_655374_cc-2.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "noun_655374_cc-1.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "noun_655374_cc.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+2.2 KB
BeeTee Demo/Assets.xcassets/MissionControl.imageset/noun_655374_cc-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.17 KB
BeeTee Demo/Assets.xcassets/MissionControl.imageset/noun_655374_cc-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.34 KB
BeeTee Demo/Assets.xcassets/MissionControl.imageset/noun_655374_cc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
This file is part of BeeTee Project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/michaeldorner/BeeTee/blob/master/LICENSE. No part of BeeTee Project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file. | ||
*/ | ||
|
||
import UIKit | ||
|
||
|
||
class MissionControlViewController: UITableViewController, BeeTeeDelegate { | ||
|
||
private let beeTeeModel = BeeTeeModel.sharedInstance | ||
|
||
@IBOutlet weak var bluetoothPowerSwitch: UISwitch! | ||
@IBOutlet weak var bluetoothScanSwitch: UISwitch! | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
beeTeeModel.subscribe(subscriber: self) | ||
bluetoothPowerSwitch.setOn(beeTeeModel.bluetoothIsOn(), animated: false) | ||
bluetoothScanSwitch.setOn(beeTeeModel.isScanning(), animated: false) | ||
} | ||
|
||
@IBAction func switchBluetoothPower() { | ||
if beeTeeModel.bluetoothIsOn() { | ||
beeTeeModel.turnBluetoothOff() | ||
} else { | ||
beeTeeModel.turnBluetoothOn() | ||
} | ||
} | ||
|
||
@IBAction func switchBluetoothScanStatus() { | ||
if beeTeeModel.isScanning() { | ||
beeTeeModel.stopScan() | ||
} else { | ||
beeTeeModel.startScanForDevices() | ||
} | ||
} | ||
|
||
func receivedBeeTeeNotification(notification: BeeTeeNotification) { | ||
tableView.reloadData() | ||
bluetoothPowerSwitch.setOn(beeTeeModel.bluetoothIsOn(), animated: true) | ||
bluetoothScanSwitch.setOn(beeTeeModel.isScanning(), animated: true) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.