Commit b7dbb6c5 authored by Alex Moore's avatar Alex Moore
Browse files

Integrated UI with scanner

parent 5739ca99
...@@ -11,10 +11,13 @@ ...@@ -11,10 +11,13 @@
D9CA44271A8988EF002039E1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D9CA44261A8988EF002039E1 /* AppDelegate.m */; }; D9CA44271A8988EF002039E1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D9CA44261A8988EF002039E1 /* AppDelegate.m */; };
D9CA442F1A8988EF002039E1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D9CA442E1A8988EF002039E1 /* Images.xcassets */; }; D9CA442F1A8988EF002039E1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D9CA442E1A8988EF002039E1 /* Images.xcassets */; };
D9CA443E1A8988EF002039E1 /* CaptuvoSDKDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D9CA443D1A8988EF002039E1 /* CaptuvoSDKDemoTests.m */; }; D9CA443E1A8988EF002039E1 /* CaptuvoSDKDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D9CA443D1A8988EF002039E1 /* CaptuvoSDKDemoTests.m */; };
D9CA444A1A898952002039E1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D9CA44491A898952002039E1 /* ViewController.m */; };
D9CA444D1A89898D002039E1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D9CA444C1A89898D002039E1 /* Main.storyboard */; }; D9CA444D1A89898D002039E1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D9CA444C1A89898D002039E1 /* Main.storyboard */; };
D9CA44551A898ABF002039E1 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D9CA44301A8988EF002039E1 /* LaunchScreen.xib */; }; D9CA44551A898ABF002039E1 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D9CA44301A8988EF002039E1 /* LaunchScreen.xib */; };
D9D2F5A91A8B1A2100CED28A /* libCaptuvoSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D9D2F5A81A8B1A2100CED28A /* libCaptuvoSDK.a */; }; D9D2F5A91A8B1A2100CED28A /* libCaptuvoSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D9D2F5A81A8B1A2100CED28A /* libCaptuvoSDK.a */; };
EF321C8C1A9D19E100567A08 /* CaptuvoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF321C8B1A9D19E100567A08 /* CaptuvoViewController.m */; };
EF321C8F1A9D1A5600567A08 /* CaptuvoScannerController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF321C8E1A9D1A5600567A08 /* CaptuvoScannerController.m */; };
EF321C921A9D1A8500567A08 /* CaptuvoOptionsController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF321C911A9D1A8500567A08 /* CaptuvoOptionsController.m */; };
EF3928921A9D1496008D6D52 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF3928911A9D1495008D6D52 /* AudioToolbox.framework */; };
EF3A94521A91565B00884373 /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF3A94511A91565B00884373 /* ExternalAccessory.framework */; }; EF3A94521A91565B00884373 /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF3A94511A91565B00884373 /* ExternalAccessory.framework */; };
EF3A94541A91566D00884373 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF3A94531A91566D00884373 /* UIKit.framework */; }; EF3A94541A91566D00884373 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF3A94531A91566D00884373 /* UIKit.framework */; };
EF3A94561A91567B00884373 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF3A94551A91567B00884373 /* Foundation.framework */; }; EF3A94561A91567B00884373 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF3A94551A91567B00884373 /* Foundation.framework */; };
...@@ -42,11 +45,16 @@ ...@@ -42,11 +45,16 @@
D9CA443C1A8988EF002039E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; D9CA443C1A8988EF002039E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D9CA443D1A8988EF002039E1 /* CaptuvoSDKDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CaptuvoSDKDemoTests.m; sourceTree = "<group>"; }; D9CA443D1A8988EF002039E1 /* CaptuvoSDKDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CaptuvoSDKDemoTests.m; sourceTree = "<group>"; };
D9CA44471A898952002039E1 /* Captuvo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Captuvo.h; sourceTree = "<group>"; }; D9CA44471A898952002039E1 /* Captuvo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Captuvo.h; sourceTree = "<group>"; };
D9CA44481A898952002039E1 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
D9CA44491A898952002039E1 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = ViewController.m; path = ../ViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
D9CA444C1A89898D002039E1 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = ../Main.storyboard; sourceTree = "<group>"; }; D9CA444C1A89898D002039E1 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = ../Main.storyboard; sourceTree = "<group>"; };
D9CA44521A898A9C002039E1 /* libCaptuvoSDK_Emulator.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCaptuvoSDK_Emulator.a; path = ../libCaptuvoSDK_Emulator.a; sourceTree = "<group>"; }; D9CA44521A898A9C002039E1 /* libCaptuvoSDK_Emulator.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCaptuvoSDK_Emulator.a; path = ../libCaptuvoSDK_Emulator.a; sourceTree = "<group>"; };
D9D2F5A81A8B1A2100CED28A /* libCaptuvoSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libCaptuvoSDK.a; sourceTree = "<group>"; }; D9D2F5A81A8B1A2100CED28A /* libCaptuvoSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libCaptuvoSDK.a; sourceTree = "<group>"; };
EF321C8A1A9D19E100567A08 /* CaptuvoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CaptuvoViewController.h; sourceTree = "<group>"; };
EF321C8B1A9D19E100567A08 /* CaptuvoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CaptuvoViewController.m; path = ../CaptuvoViewController.m; sourceTree = "<group>"; };
EF321C8D1A9D1A5600567A08 /* CaptuvoScannerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CaptuvoScannerController.h; sourceTree = "<group>"; };
EF321C8E1A9D1A5600567A08 /* CaptuvoScannerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CaptuvoScannerController.m; path = ../CaptuvoScannerController.m; sourceTree = "<group>"; };
EF321C901A9D1A8500567A08 /* CaptuvoOptionsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaptuvoOptionsController.h; path = CaptuvoSDKDemo/CaptuvoOptionsController.h; sourceTree = "<group>"; };
EF321C911A9D1A8500567A08 /* CaptuvoOptionsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CaptuvoOptionsController.m; sourceTree = "<group>"; };
EF3928911A9D1495008D6D52 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
EF3A94511A91565B00884373 /* ExternalAccessory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExternalAccessory.framework; path = System/Library/Frameworks/ExternalAccessory.framework; sourceTree = SDKROOT; }; EF3A94511A91565B00884373 /* ExternalAccessory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExternalAccessory.framework; path = System/Library/Frameworks/ExternalAccessory.framework; sourceTree = SDKROOT; };
EF3A94531A91566D00884373 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; EF3A94531A91566D00884373 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
EF3A94551A91567B00884373 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; EF3A94551A91567B00884373 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
...@@ -57,6 +65,7 @@ ...@@ -57,6 +65,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
EF3928921A9D1496008D6D52 /* AudioToolbox.framework in Frameworks */,
EF3A94561A91567B00884373 /* Foundation.framework in Frameworks */, EF3A94561A91567B00884373 /* Foundation.framework in Frameworks */,
EF3A94541A91566D00884373 /* UIKit.framework in Frameworks */, EF3A94541A91566D00884373 /* UIKit.framework in Frameworks */,
EF3A94521A91565B00884373 /* ExternalAccessory.framework in Frameworks */, EF3A94521A91565B00884373 /* ExternalAccessory.framework in Frameworks */,
...@@ -77,6 +86,7 @@ ...@@ -77,6 +86,7 @@
D9CA44151A8988EF002039E1 = { D9CA44151A8988EF002039E1 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
EF3928911A9D1495008D6D52 /* AudioToolbox.framework */,
EF3A94551A91567B00884373 /* Foundation.framework */, EF3A94551A91567B00884373 /* Foundation.framework */,
EF3A94531A91566D00884373 /* UIKit.framework */, EF3A94531A91566D00884373 /* UIKit.framework */,
EF3A94511A91565B00884373 /* ExternalAccessory.framework */, EF3A94511A91565B00884373 /* ExternalAccessory.framework */,
...@@ -101,7 +111,9 @@ ...@@ -101,7 +111,9 @@
D9CA44501A8989C2002039E1 /* Frameworks */, D9CA44501A8989C2002039E1 /* Frameworks */,
D9CA444B1A898965002039E1 /* Include */, D9CA444B1A898965002039E1 /* Include */,
D9CA44261A8988EF002039E1 /* AppDelegate.m */, D9CA44261A8988EF002039E1 /* AppDelegate.m */,
D9CA44491A898952002039E1 /* ViewController.m */, EF321C8B1A9D19E100567A08 /* CaptuvoViewController.m */,
EF321C8E1A9D1A5600567A08 /* CaptuvoScannerController.m */,
EF321C911A9D1A8500567A08 /* CaptuvoOptionsController.m */,
D9CA444C1A89898D002039E1 /* Main.storyboard */, D9CA444C1A89898D002039E1 /* Main.storyboard */,
D9CA442E1A8988EF002039E1 /* Images.xcassets */, D9CA442E1A8988EF002039E1 /* Images.xcassets */,
D9CA44301A8988EF002039E1 /* LaunchScreen.xib */, D9CA44301A8988EF002039E1 /* LaunchScreen.xib */,
...@@ -141,7 +153,9 @@ ...@@ -141,7 +153,9 @@
children = ( children = (
D9CA44251A8988EF002039E1 /* AppDelegate.h */, D9CA44251A8988EF002039E1 /* AppDelegate.h */,
D9CA44471A898952002039E1 /* Captuvo.h */, D9CA44471A898952002039E1 /* Captuvo.h */,
D9CA44481A898952002039E1 /* ViewController.h */, EF321C8A1A9D19E100567A08 /* CaptuvoViewController.h */,
EF321C8D1A9D1A5600567A08 /* CaptuvoScannerController.h */,
EF321C901A9D1A8500567A08 /* CaptuvoOptionsController.h */,
); );
name = Include; name = Include;
path = ..; path = ..;
...@@ -261,9 +275,11 @@ ...@@ -261,9 +275,11 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D9CA444A1A898952002039E1 /* ViewController.m in Sources */, EF321C8C1A9D19E100567A08 /* CaptuvoViewController.m in Sources */,
D9CA44271A8988EF002039E1 /* AppDelegate.m in Sources */, D9CA44271A8988EF002039E1 /* AppDelegate.m in Sources */,
D9CA44241A8988EF002039E1 /* main.m in Sources */, D9CA44241A8988EF002039E1 /* main.m in Sources */,
EF321C8F1A9D1A5600567A08 /* CaptuvoScannerController.m in Sources */,
EF321C921A9D1A8500567A08 /* CaptuvoOptionsController.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "AppDelegate.h" #import "AppDelegate.h"
#import "ViewController.h" #import "CaptuvoViewController.h"
@interface AppDelegate () @interface AppDelegate ()
......
//
// CaptuvoOptionsController.h
// CaptuvoSDKDemo
//
// Created by PLUC SeniorDesign on 2/24/15.
// Copyright (c) 2015 Anthony J. Carno. All rights reserved.
//
#import "CaptuvoViewController.h"
@interface CaptuvoOptionsController : CaptuvoViewController
@property (weak, nonatomic) IBOutlet UIStepper *sledSoundStepper;
@property (weak, nonatomic) IBOutlet UILabel *sledSoundLabel;
@end
//
// CaptuvoOptionsController.m
// CaptuvoSDKDemo
//
// Created by PLUC SeniorDesign on 2/24/15.
// Copyright (c) 2015 Anthony J. Carno. All rights reserved.
//
#import "CaptuvoOptionsController.h"
@interface CaptuvoOptionsController ()
@end
@implementation CaptuvoOptionsController
int sled_volume;
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[[Captuvo sharedCaptuvoDevice] requestDecoderGoodReadBeeperVolumeStatus];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/**
@brief This method identifies the current sled volume and then sets the label and the stepper to the correct values.
*/
- (void)decoderGoodReadBeeperVolumeStatus:(BeeperVolume)volume
{
switch (volume) {
case BeeperVolumeHigh:
sled_volume = 3;
self.sledSoundLabel.text = @"High";
break;
case BeeperVolumeMedium:
sled_volume = 2;
self.sledSoundLabel.text = @"Medium";
break;
case BeeperVolumeLow:
sled_volume = 1;
self.sledSoundLabel.text = @"Low";
break;
case BeeperVolumeOff:
sled_volume = 0;
self.sledSoundLabel.text = @"Silent";
break;
default:
break;
}
self.sledSoundStepper.value = (double)sled_volume;
}
/**
@brief This method changes the sled volume between high, medium, low, and silent.
@param (id)sender - tied to button
@return IBAction - tied to button
*/
- (IBAction)changeSledVolume:(id)sender {
sled_volume = (int)self.sledSoundStepper.value;
switch (sled_volume) {
case 0:
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadBeeperVolume:BeeperVolumeOff persistSetting:NO];
self.sledSoundLabel.text = @"Silent";
break;
case 1:
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadBeeperVolume:BeeperVolumeLow persistSetting:NO];
self.sledSoundLabel.text = @"Low";
break;
case 2:
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadBeeperVolume:BeeperVolumeMedium persistSetting:NO];
self.sledSoundLabel.text = @"Medium";
break;
case 3:
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadBeeperVolume:BeeperVolumeHigh persistSetting:NO];
self.sledSoundLabel.text = @"High";
break;
default:
break;
}
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// CaptuvoScannerController.h
// CaptuvoSDKDemo
//
// Created by PLUC SeniorDesign on 2/24/15.
// Copyright (c) 2015 Anthony J. Carno. All rights reserved.
//
#import "CaptuvoViewController.h"
@interface CaptuvoScannerController : CaptuvoViewController
@property (weak, nonatomic) IBOutlet UILabel *barcodeLabel;
@end
// //
// ViewController.m // CaptuvoScannerController.m
// TestApp3_ScannerCalls // CaptuvoSDKDemo
// //
// Created by Anthony J. Carno on 2/4/15. // Created by PLUC SeniorDesign on 2/24/15.
// Copyright (c) 2015 Anthony J. Carno. All rights reserved. // Copyright (c) 2015 Anthony J. Carno. All rights reserved.
// //
#import "ViewController.h" #import "CaptuvoScannerController.h"
@interface ViewController () @interface CaptuvoScannerController ()
@end @end
@implementation ViewController @implementation CaptuvoScannerController
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib. // Do any additional setup after loading the view, typically from a nib.
[self initDecoder];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
[[Captuvo sharedCaptuvoDevice] removeCaptuvoDelegate:self];
} }
- (void)initCaptuvoSDK /**
@brief This method attempts to establish a connection to the Captuvo SL22 Enterprise Sled and start the decoder hardware. A UIAlertView prompts the user if a connection cannot be established. Additionally, this method adds the current class (self) as a CaptuvoDelegate.
@return ProtocolConnectionStatus - the connection status of the Captuvo sled
*/
- (void)initDecoder
{ {
[[Captuvo sharedCaptuvoDevice] addCaptuvoDelegate:self] ;
ProtocolConnectionStatus status = [[Captuvo sharedCaptuvoDevice] startDecoderHardware]; ProtocolConnectionStatus status = [[Captuvo sharedCaptuvoDevice] startDecoderHardware];
// switch (status) { // switch (status) {
// case ProtocolConnectionStatusAlreadyConnected: // case ProtocolConnectionStatusAlreadyConnected:
// printf("ProtocolConnectionStatusAlreadyConnected\n"); // printf("ProtocolConnectionStatusAlreadyConnected\n");
// break; // break;
// case ProtocolConnectionStatusBatteryDepleted: // case ProtocolConnectionStatusBatteryDepleted:
// printf("ProtocolConnectionStatusBatteryDepleted\n"); // printf("ProtocolConnectionStatusBatteryDepleted\n");
// break; // break;
// case ProtocolConnectionStatusConnected: // case ProtocolConnectionStatusConnected:
// printf("ProtocolConnectionStatusConnected\n"); // printf("ProtocolConnectionStatusConnected\n");
// break; // break;
// case ProtocolConnectionStatusUnableToConnect: // case ProtocolConnectionStatusUnableToConnect:
// printf("ProtocolConnectionStatusUnableToConnect\n"); // printf("ProtocolConnectionStatusUnableToConnect\n");
// break; // break;
// case ProtocolConnectionStatusUnableToConnectIncompatiableSledFirmware: // case ProtocolConnectionStatusUnableToConnectIncompatiableSledFirmware:
// printf("ProtocolConnectionStatusUnableToConnectIncompatiableSledFirmware\n"); // printf("ProtocolConnectionStatusUnableToConnectIncompatiableSledFirmware\n");
// break; // break;
// default: // default:
// printf("ERROR\n"); // printf("ERROR\n");
// break; // break;
// } // }
if (status == ProtocolConnectionStatusUnableToConnect) { if (status == ProtocolConnectionStatusUnableToConnect) {
UIAlertView *sledAlert = [[UIAlertView alloc] initWithTitle:@"Connection Error" UIAlertView *sledAlert = [[UIAlertView alloc] initWithTitle:@"Connection Error"
message:@"Unable to communicate with sled - unknown communication error." message:@"Unable to communicate with sled - unknown communication error."
...@@ -74,30 +79,30 @@ ...@@ -74,30 +79,30 @@
otherButtonTitles:nil]; otherButtonTitles:nil];
[sledAlert show]; [sledAlert show];
} }
[[Captuvo sharedCaptuvoDevice] requestBatteryVoltage] ; //[[Captuvo sharedCaptuvoDevice] requestBatteryVoltage] ;
[[Captuvo sharedCaptuvoDevice] requestChargeStatus] ; //[[Captuvo sharedCaptuvoDevice] requestChargeStatus] ;
} }
- (IBAction)connectToSled:(id)sender {
[self initCaptuvoSDK];
self.sledNameLabel.text = [[Captuvo sharedCaptuvoDevice] getCaptuvoName];
self.sledSerialNumberLabel.text = [[Captuvo sharedCaptuvoDevice] getCaptuvoSerialNumber];
self.sledHardwareRevisionLabel.text = [[Captuvo sharedCaptuvoDevice] getCaptuvoHardwareRevision];
}
- (IBAction)toggleSledBeeper:(id)sender {
if (!self.sledBeeperSwitch.on) {
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadBeeperVolume:BeeperVolumeOff persistSetting:NO];
}
else if (self.sledBeeperSwitch.on) {
[[Captuvo sharedCaptuvoDevice] setDecoderGoodReadBeeperVolume:BeeperVolumeMedium persistSetting:NO];
}
}
/**
@brief This method handles the barcode data returned by the scanner
@param (NSString *)data - the scanned barcode (in text form)
*/
- (void) decoderDataReceived:(NSString *)data { - (void) decoderDataReceived:(NSString *)data {
self.barcodeLabel.textAlignment = NSTextAlignmentLeft; self.barcodeLabel.textAlignment = NSTextAlignmentLeft;
self.barcodeLabel.text = data; self.barcodeLabel.text = data;
} }
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end @end
//
// CaptuvoViewController.h
// CaptuvoSDKDemo
//
// Created by PLUC SeniorDesign on 2/24/15.
// Copyright (c) 2015 Anthony J. Carno. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Captuvo.h"
@interface CaptuvoViewController : UIViewController<CaptuvoEventsProtocol>
@end
//
// CaptuvoViewController.m
// CaptuvoSDKDemo
//
// Created by PLUC SeniorDesign on 2/24/15.
// Copyright (c) 2015 Anthony J. Carno. All rights reserved.
//
#import "CaptuvoViewController.h"
@interface CaptuvoViewController ()
@end
@implementation CaptuvoViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[[Captuvo sharedCaptuvoDevice] addCaptuvoDelegate:self] ;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
[[Captuvo sharedCaptuvoDevice] removeCaptuvoDelegate:self];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
This diff is collapsed.
//
// ViewController.h
// TestApp3_ScannerCalls
//
// Created by Anthony J. Carno on 2/4/15.
// Copyright (c) 2015 Anthony J. Carno. All rights reserved.
//
#import <UIKit/UIKit.h>
#include "Captuvo.h"
@interface ViewController : UIViewController<CaptuvoEventsProtocol>
{
}
@property (weak, nonatomic) IBOutlet UIButton *connectToSledButton;
@property (weak, nonatomic) IBOutlet UILabel *sledNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *sledSerialNumberLabel;
@property (weak, nonatomic) IBOutlet UILabel *sledHardwareRevisionLabel;
@property (weak, nonatomic) IBOutlet UILabel *barcodeLabel;
@property (weak, nonatomic) IBOutlet UISwitch *sledBeeperSwitch;
@end
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
78FD6B3D1A8185AF00D48A92 /* ScanBookViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FD6B3C1A8185AF00D48A92 /* ScanBookViewController.m */; }; 78FD6B3D1A8185AF00D48A92 /* ScanBookViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FD6B3C1A8185AF00D48A92 /* ScanBookViewController.m */; };
78FD6B431A818D3100D48A92 /* SectionTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FD6B421A818D3100D48A92 /* SectionTableViewController.m */; }; 78FD6B431A818D3100D48A92 /* SectionTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FD6B421A818D3100D48A92 /* SectionTableViewController.m */; };
78FD6B461A81929200D48A92 /* LogInViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FD6B451A81929200D48A92 /* LogInViewController.m */; }; 78FD6B461A81929200D48A92 /* LogInViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FD6B451A81929200D48A92 /* LogInViewController.m */; };
EF2233281A9FA2DD005F0FFC /* CaptuvoScannerController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF2233251A9FA2DD005F0FFC /* CaptuvoScannerController.m */; };
EF2233291A9FA2DD005F0FFC /* CaptuvoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF2233271A9FA2DD005F0FFC /* CaptuvoViewController.m */; };
EF22332C1A9FA2FC005F0FFC /* CaptuvoOptionsController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF22332B1A9FA2FC005F0FFC /* CaptuvoOptionsController.m */; };
EF22332F1A9FA320005F0FFC /* libCaptuvoSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EF22332E1A9FA320005F0FFC /* libCaptuvoSDK.a */; };
EF5D7C151A93E7F7005FD90F /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF5D7C141A93E7F7005FD90F /* SettingsViewController.m */; }; EF5D7C151A93E7F7005FD90F /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EF5D7C141A93E7F7005FD90F /* SettingsViewController.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -60,6 +64,14 @@ ...@@ -60,6 +64,14 @@
78FD6B421A818D3100D48A92 /* SectionTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SectionTableViewController.m; sourceTree = "<group>"; }; 78FD6B421A818D3100D48A92 /* SectionTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SectionTableViewController.m; sourceTree = "<group>"; };
78FD6B441A81929200D48A92 /* LogInViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogInViewController.h; sourceTree = "<group>"; }; 78FD6B441A81929200D48A92 /* LogInViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogInViewController.h; sourceTree = "<group>"; };
78FD6B451A81929200D48A92 /* LogInViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogInViewController.m; sourceTree = "<group>"; }; 78FD6B451A81929200D48A92 /* LogInViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogInViewController.m; sourceTree = "<group>"; };
EF2233241A9FA2DD005F0FFC /* CaptuvoScannerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CaptuvoScannerController.h; sourceTree = "<group>"; };
EF2233251A9FA2DD005F0FFC /* CaptuvoScannerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CaptuvoScannerController.m; sourceTree = "<group>"; };
EF2233261A9FA2DD005F0FFC /* CaptuvoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CaptuvoViewController.h; sourceTree = "<group>"; };
EF2233271A9FA2DD005F0FFC /* CaptuvoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CaptuvoViewController.m; sourceTree = "<group>"; };
EF22332A1A9FA2FC005F0FFC /* CaptuvoOptionsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CaptuvoOptionsController.h; sourceTree = "<group>"; };
EF22332B1A9FA2FC005F0FFC /* CaptuvoOptionsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CaptuvoOptionsController.m; sourceTree = "<group>"; };
EF22332D1A9FA320005F0FFC /* Captuvo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Captuvo.h; sourceTree = "<group>"; };
EF22332E1A9FA320005F0FFC /* libCaptuvoSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libCaptuvoSDK.a; sourceTree = "<group>"; };
EF5D7C131A93E7F7005FD90F /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = "<group>"; }; EF5D7C131A93E7F7005FD90F /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = "<group>"; };
EF5D7C141A93E7F7005FD90F /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = "<group>"; }; EF5D7C141A93E7F7005FD90F /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -70,6 +82,7 @@ ...@@ -70,6 +82,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (