├── .gitignore ├── DefaultIcon.png ├── LICENSE ├── README.md ├── app ├── alloy.js ├── assets │ ├── commands │ │ ├── colorm.sphero │ │ └── dance1.sphero │ ├── fonts │ │ └── README │ ├── images │ │ ├── icons │ │ │ ├── arrow-right.png │ │ │ ├── arrow-right@2x.png │ │ │ ├── connected.png │ │ │ ├── connected@2x.png │ │ │ ├── disconnected.png │ │ │ ├── disconnected@2x.png │ │ │ ├── features │ │ │ │ ├── colorize.png │ │ │ │ ├── colorize@2x.png │ │ │ │ ├── drive.png │ │ │ │ ├── drive@2x.png │ │ │ │ ├── routes.png │ │ │ │ └── routes@2x.png │ │ │ ├── settings.png │ │ │ └── settings@2x.png │ │ └── logo@2x.png │ ├── iphone │ │ ├── Default-568h@2x.png │ │ ├── Default-667h@2x.png │ │ ├── Default-Portrait-736h@3x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ └── Default@2x.png │ ├── nko_brightness_guide.png │ ├── nko_brightness_guide@2x.png │ └── nko_colormap.png ├── config.json ├── controllers │ └── index.js ├── i18n │ ├── de │ │ └── strings.xml │ └── en │ │ └── strings.xml ├── lib │ ├── bluetooth.js │ ├── controls.js │ ├── robot.js │ ├── tests │ │ ├── should.js │ │ ├── suites.js │ │ └── ti-mocha.js │ ├── ti.sphero.js │ ├── ti.touchid.js │ ├── utils.js │ └── webcolor.js ├── models │ └── device.js ├── styles │ ├── app.tss │ └── index.tss ├── views │ └── index.xml └── widgets │ ├── com.appcelerator.robot.devicedetails │ ├── controllers │ │ ├── colorize │ │ │ └── index.js │ │ ├── drive │ │ │ └── index.js │ │ ├── routes │ │ │ ├── index.js │ │ │ └── routes.js │ │ └── widget.js │ ├── styles │ │ ├── colorize │ │ │ └── index.tss │ │ ├── drive │ │ │ └── index.tss │ │ ├── routes │ │ │ └── index.tss │ │ └── widget.tss │ ├── views │ │ ├── colorize │ │ │ └── index.xml │ │ ├── drive │ │ │ └── index.xml │ │ ├── routes │ │ │ └── index.xml │ │ └── widget.xml │ └── widget.json │ ├── com.appcelerator.robot.devicelist │ ├── controllers │ │ └── widget.js │ ├── styles │ │ └── widget.tss │ ├── views │ │ └── widget.xml │ └── widget.json │ ├── com.appcelerator.robot.devicesearch │ ├── controllers │ │ ├── manualSearch.js │ │ └── widget.js │ ├── styles │ │ ├── manualSearch.tss │ │ └── widget.tss │ ├── views │ │ ├── manualSearch.xml │ │ └── widget.xml │ └── widget.json │ └── com.appcelerator.robot.settings │ ├── controllers │ ├── environment.js │ ├── webview.js │ └── widget.js │ ├── styles │ ├── environment.tss │ ├── webview.tss │ └── widget.tss │ ├── views │ ├── environment.xml │ ├── webview.xml │ └── widget.xml │ └── widget.json ├── appc.js ├── i18n ├── alloy_generated ├── de │ └── strings.xml └── en │ └── strings.xml ├── platform └── ios │ └── alloy_generated ├── plugins └── ti.alloy │ ├── hooks │ ├── alloy.js │ └── deepclean.js │ └── plugin.py ├── src └── RobotKit.framework │ ├── Frameworks │ ├── CPPCoreSDK.framework │ │ ├── APIV2Processor.d │ │ ├── APIV2Processor.dia │ │ ├── APIV2Processor.o │ │ ├── CPPCoreSDK │ │ ├── DLog.d │ │ ├── DLog.dia │ │ ├── DLog.o │ │ ├── Headers │ │ │ ├── APIV2.h │ │ │ ├── APIV2Constants.h │ │ │ ├── APIV2Processor.h │ │ │ ├── CPPCoreSDK.h │ │ │ └── Packet.h │ │ ├── Info.plist │ │ ├── Modules │ │ │ └── module.modulemap │ │ ├── Packet.d │ │ ├── Packet.dia │ │ ├── Packet.o │ │ └── _CodeSignature │ │ │ ├── CodeDirectory │ │ │ ├── CodeRequirements │ │ │ ├── CodeRequirements-1 │ │ │ ├── CodeResources │ │ │ └── CodeSignature │ ├── RobotCommandKit.framework │ │ ├── Headers │ │ │ ├── FWLevel1DiagnosticAsyncData.h │ │ │ ├── FWLevel1DiagnosticChunkedAsyncData.h │ │ │ ├── FWLevel1DiagnosticChunkedCommand.h │ │ │ ├── FWLevel1DiagnosticChunkedResponse.h │ │ │ ├── FWLevel1DiagnosticCommand.h │ │ │ ├── FWLevel1DiagnosticResponse.h │ │ │ ├── NSData+Extensions.h │ │ │ ├── NSData+RobotDataParsing.h │ │ │ ├── RKAccelerometerData.h │ │ │ ├── RKAppUtils.h │ │ │ ├── RKAsyncFactory.h │ │ │ ├── RKAsyncId.h │ │ │ ├── RKAsyncMessage.h │ │ │ ├── RKAttitudeData.h │ │ │ ├── RKBackEMFData.h │ │ │ ├── RKBackLEDOutputCommand.h │ │ │ ├── RKBackLEDOutputResponse.h │ │ │ ├── RKBuildDescriptors.h │ │ │ ├── RKByteAsyncMessage.h │ │ │ ├── RKByteCommand.h │ │ │ ├── RKByteResponse.h │ │ │ ├── RKCollisionDetectedAsyncData.h │ │ │ ├── RKCommandList.h │ │ │ ├── RKConfigureCollisionDetectionCommand.h │ │ │ ├── RKConfigureCollisionDetectionResponse.h │ │ │ ├── RKConfigureLocatorCommand.h │ │ │ ├── RKConfigureLocatorResponse.h │ │ │ ├── RKDeviceCommand.h │ │ │ ├── RKDeviceList.h │ │ │ ├── RKDeviceMessage.h │ │ │ ├── RKDeviceResponse.h │ │ │ ├── RKDeviceSensorsAsyncData.h │ │ │ ├── RKDeviceSensorsData.h │ │ │ ├── RKDiscoveryAgent.h │ │ │ ├── RKDriveAlgorithm.h │ │ │ ├── RKFlashWritingCommandDetector.h │ │ │ ├── RKForceChargeCommand.h │ │ │ ├── RKGetAutoReconnectCommand.h │ │ │ ├── RKGetAutoReconnectResponse.h │ │ │ ├── RKGetBluetoothInfoCommand.h │ │ │ ├── RKGetBluetoothInfoResponse.h │ │ │ ├── RKGetChargerStateCommand.h │ │ │ ├── RKGetChargerStateResponse.h │ │ │ ├── RKGetChassisIdCommand.h │ │ │ ├── RKGetChassisIdResponse.h │ │ │ ├── RKGetDeviceModeCommand.h │ │ │ ├── RKGetDeviceModeResponse.h │ │ │ ├── RKGetNonPersistentOptionFlagsCommand.h │ │ │ ├── RKGetNonPersistentOptionFlagsResponse.h │ │ │ ├── RKGetOptionFlagsCommand.h │ │ │ ├── RKGetOptionFlagsResponse.h │ │ │ ├── RKGetPersistentPageCRCCommand.h │ │ │ ├── RKGetPersistentPageCRCResponse.h │ │ │ ├── RKGetPowerStateCommand.h │ │ │ ├── RKGetPowerStateResponse.h │ │ │ ├── RKGetSkuCommand.h │ │ │ ├── RKGetSkuResponse.h │ │ │ ├── RKGetUserRGBLEDColorCommand.h │ │ │ ├── RKGetUserRGBLEDColorResponse.h │ │ │ ├── RKGoToSleepCommand.h │ │ │ ├── RKGoToSleepResponse.h │ │ │ ├── RKGyroData.h │ │ │ ├── RKJoyStickDriveAlgorithm.h │ │ │ ├── RKJumpToBootloaderCommand.h │ │ │ ├── RKJumpToBootloaderResponse.h │ │ │ ├── RKJumpToMainAppCommand.h │ │ │ ├── RKJumpToMainAppResponse.h │ │ │ ├── RKLastDataStreamingDataTracker.h │ │ │ ├── RKLinkDelegate.h │ │ │ ├── RKLocatorData.h │ │ │ ├── RKMagnetometerData.h │ │ │ ├── RKMainProcessorState.h │ │ │ ├── RKMajorMinorVersion.h │ │ │ ├── RKMath.h │ │ │ ├── RKPingCommand.h │ │ │ ├── RKPingResponse.h │ │ │ ├── RKPowerNotificationAsyncData.h │ │ │ ├── RKQuaternionData.h │ │ │ ├── RKRGBLEDOutputCommand.h │ │ │ ├── RKRGBLEDOutputResponse.h │ │ │ ├── RKRawMotorValuesCommand.h │ │ │ ├── RKRawMotorValuesResponse.h │ │ │ ├── RKReadOdometerCommand.h │ │ │ ├── RKReadOdometerResponse.h │ │ │ ├── RKResponseCodes.h │ │ │ ├── RKResponseFactory.h │ │ │ ├── RKRobotBase.h │ │ │ ├── RKRobotNotification.h │ │ │ ├── RKRollCommand.h │ │ │ ├── RKRollingQueue.h │ │ │ ├── RKRotationRateCommand.h │ │ │ ├── RKRotationRateResponse.h │ │ │ ├── RKSelfLevelCommand.h │ │ │ ├── RKSelfLevelCompleteAsyncData.h │ │ │ ├── RKSelfLevelResponse.h │ │ │ ├── RKSensorData.h │ │ │ ├── RKSession.h │ │ │ ├── RKSetAutoReconnectCommand.h │ │ │ ├── RKSetAutoReconnectResponse.h │ │ │ ├── RKSetBluetoothNameCommand.h │ │ │ ├── RKSetBluetoothNameResponse.h │ │ │ ├── RKSetDataStreamingCommand.h │ │ │ ├── RKSetDataStreamingResponse.h │ │ │ ├── RKSetFactoryDeviceModeCommand.h │ │ │ ├── RKSetFactoryDeviceModeResponse.h │ │ │ ├── RKSetHeadingCommand.h │ │ │ ├── RKSetHeadingResponse.h │ │ │ ├── RKSetInactivityTimeoutCommand.h │ │ │ ├── RKSetInactivityTimeoutResponse.h │ │ │ ├── RKSetMotionTimeoutCommand.h │ │ │ ├── RKSetMotionTimeoutResponse.h │ │ │ ├── RKSetNonPersistentOptionFlagsCommand.h │ │ │ ├── RKSetNonPersistentOptionFlagsResponse.h │ │ │ ├── RKSetOptionFlagsCommand.h │ │ │ ├── RKSetOptionFlagsResponse.h │ │ │ ├── RKSetPIDCommand.h │ │ │ ├── RKSetPowerNotificationCommand.h │ │ │ ├── RKSetPowerNotificationResponse.h │ │ │ ├── RKSetUserHackModeCommand.h │ │ │ ├── RKSetUserHackModeResponse.h │ │ │ ├── RKSleepDidOccurMessage.h │ │ │ ├── RKSleepWillOccurMessage.h │ │ │ ├── RKStabilizationCommand.h │ │ │ ├── RKStabilizationResponse.h │ │ │ ├── RKStat.h │ │ │ ├── RKStatEventListener.h │ │ │ ├── RKStatForPacketFactory.h │ │ │ ├── RKStatOdometerHack.h │ │ │ ├── RKStatRecorder.h │ │ │ ├── RKStats.h │ │ │ ├── RKTemperatureCommand.h │ │ │ ├── RKTemperatureResponse.h │ │ │ ├── RKTypes.h │ │ │ ├── RKURLRequestFactory.h │ │ │ ├── RKV1Session.h │ │ │ ├── RKV2Session.h │ │ │ ├── RKVersioningCommand.h │ │ │ ├── RKVersioningResponse.h │ │ │ ├── RKWebSyncAgent.h │ │ │ ├── RKWritePersistentPageCommand.h │ │ │ ├── RKWritePersistentPageResponse.h │ │ │ ├── RobotCommandKit-Prefix.pch │ │ │ └── RobotCommandKit.h │ │ ├── Info.plist │ │ ├── RobotCommandKit │ │ └── _CodeSignature │ │ │ ├── CodeDirectory │ │ │ ├── CodeRequirements │ │ │ ├── CodeRequirements-1 │ │ │ ├── CodeResources │ │ │ └── CodeSignature │ ├── RobotKitClassic.framework │ │ ├── Headers │ │ │ ├── RKAccelerometerFilter.h │ │ │ ├── RKAccuAngleDriveAddon.h │ │ │ ├── RKDiscoveryAgentClassic.h │ │ │ ├── RKLogarithmicScaleDriveAddon.h │ │ │ ├── RKRobotClassic.h │ │ │ ├── RKSteeringWheelDriveAlgorithm.h │ │ │ ├── RKTiltDriveAlgorithm.h │ │ │ ├── RKTypes.h │ │ │ └── RobotKitClassic.h │ │ ├── Info.plist │ │ ├── PrivateHeaders │ │ │ └── RKTighterControlAddon.h │ │ ├── RobotKitClassic │ │ └── _CodeSignature │ │ │ ├── CodeDirectory │ │ │ ├── CodeRequirements │ │ │ ├── CodeRequirements-1 │ │ │ ├── CodeResources │ │ │ └── CodeSignature │ ├── RobotKitLE.framework │ │ ├── Headers │ │ │ ├── CBUUID+Extension.h │ │ │ ├── NSMutableArray+OrbQueue.h │ │ │ ├── RKAccessoryDiscoveryAgent.h │ │ │ ├── RKByNameConnectStrategy.h │ │ │ ├── RKCharacteristic.h │ │ │ ├── RKControlSystemPresetCommand.h │ │ │ ├── RKDeviceInfoServiceWrapper.h │ │ │ ├── RKDiscoveryAgentLE.h │ │ │ ├── RKHiByeMonitor.h │ │ │ ├── RKLeBaseLink.h │ │ │ ├── RKLeBatchConnectStrategy.h │ │ │ ├── RKLeClosestConnectStrategy.h │ │ │ ├── RKLeConnectStrategy.h │ │ │ ├── RKLeFavoritesManager.h │ │ │ ├── RKLeIfOneConnectStrategy.h │ │ │ ├── RKLeNode.h │ │ │ ├── RKLeProximityConnectStrategy.h │ │ │ ├── RKLeRobotLink.h │ │ │ ├── RKNoConnectStrategy.h │ │ │ ├── RKNodeStateChangedNotification.h │ │ │ ├── RKRadioDescriptor.h │ │ │ ├── RKRadioServiceWrapper.h │ │ │ ├── RKRobotDiscoveryAgentLE.h │ │ │ ├── RKRobotLE.h │ │ │ ├── RKRobotRadioDescriptor.h │ │ │ └── RobotKitLE.h │ │ ├── Info.plist │ │ ├── RobotKitLE │ │ └── _CodeSignature │ │ │ ├── CodeDirectory │ │ │ ├── CodeRequirements │ │ │ ├── CodeRequirements-1 │ │ │ ├── CodeResources │ │ │ └── CodeSignature │ └── RobotLanguageKit.framework │ │ ├── Headers │ │ ├── RKAbortMacroCommand.h │ │ ├── RKAbortMacroResponse.h │ │ ├── RKAppendCompleteOvalCommand.h │ │ ├── RKAppendCompleteOvalResponse.h │ │ ├── RKAppendFragmentOvalCommand.h │ │ ├── RKAppendFragmentOvalResponse.h │ │ ├── RKInitMacroExecutiveCommand.h │ │ ├── RKInitMacroExecutiveResponse.h │ │ ├── RKMCCalibrate.h │ │ ├── RKMCComment.h │ │ ├── RKMCDelay.h │ │ ├── RKMCEmit.h │ │ ├── RKMCFrontLED.h │ │ ├── RKMCGoSub.h │ │ ├── RKMCGoTo.h │ │ ├── RKMCLoopEnd.h │ │ ├── RKMCLoopFor.h │ │ ├── RKMCRGB.h │ │ ├── RKMCRGBSD2.h │ │ ├── RKMCRawMotor.h │ │ ├── RKMCRoll.h │ │ ├── RKMCRollSD1.h │ │ ├── RKMCRollSD1SPD1.h │ │ ├── RKMCRollSD1SPD2.h │ │ ├── RKMCRotateOverTime.h │ │ ├── RKMCRotateOverTimeSD1.h │ │ ├── RKMCRotateOverTimeSD2.h │ │ ├── RKMCRotationRate.h │ │ ├── RKMCSD1.h │ │ ├── RKMCSD2.h │ │ ├── RKMCSPD1.h │ │ ├── RKMCSPD2.h │ │ ├── RKMCSleep.h │ │ ├── RKMCSlew.h │ │ ├── RKMCStabilization.h │ │ ├── RKMCStop.h │ │ ├── RKMCStreamEnd.h │ │ ├── RKMCWaitUntilStop.h │ │ ├── RKMacroCommand.h │ │ ├── RKMacroEmitMarker.h │ │ ├── RKMacroObject+Compatibility.h │ │ ├── RKMacroObject.h │ │ ├── RKMacroPlayer.h │ │ ├── RKOrbBasicAbortCommand.h │ │ ├── RKOrbBasicAbortResponse.h │ │ ├── RKOrbBasicAppendFragmentCommand.h │ │ ├── RKOrbBasicAppendFragmentResponse.h │ │ ├── RKOrbBasicEraseStorageCommand.h │ │ ├── RKOrbBasicEraseStorageResponse.h │ │ ├── RKOrbBasicErrorASCII.h │ │ ├── RKOrbBasicErrorBinary.h │ │ ├── RKOrbBasicExecuteCommand.h │ │ ├── RKOrbBasicExecuteResponse.h │ │ ├── RKOrbBasicPrintMessage.h │ │ ├── RKOrbBasicProgram.h │ │ ├── RKOvalControl.h │ │ ├── RKOvalDeviceBroadcast.h │ │ ├── RKOvalErrorBroadcast.h │ │ ├── RKResetOvmCommand.h │ │ ├── RKResetOvmResponse.h │ │ ├── RKRunMacroCommand.h │ │ ├── RKRunMacroResponse.h │ │ ├── RKSaveMacroCommand.h │ │ ├── RKSaveMacroResponse.h │ │ ├── RKSaveTemporaryMacroChunkCommand.h │ │ ├── RKSaveTemporaryMacroChunkResponse.h │ │ ├── RKSaveTemporaryMacroCommand.h │ │ ├── RKSaveTemporaryMacroResponse.h │ │ └── RobotLanguageKit.h │ │ ├── Info.plist │ │ ├── RobotLanguageKit │ │ └── _CodeSignature │ │ ├── CodeDirectory │ │ ├── CodeRequirements │ │ ├── CodeRequirements-1 │ │ ├── CodeResources │ │ └── CodeSignature │ ├── Headers │ ├── RKConvenienceRobot.h │ ├── RKDriveable.h │ ├── RKOllie.h │ ├── RKRobotDiscoveryAgent.h │ ├── RKSensorControl.h │ ├── RKSphero.h │ └── RobotKit.h │ ├── Info.plist │ ├── PrivateHeaders │ └── RobotKitPrivate.h │ ├── RobotKit │ └── _CodeSignature │ ├── CodeDirectory │ ├── CodeRequirements │ ├── CodeRequirements-1 │ ├── CodeResources │ └── CodeSignature └── tiapp.xml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Resources 3 | build.log 4 | build 5 | npm-debug.log 6 | tmp 7 | .map 8 | .project 9 | .settings 10 | Thumbs.db 11 | app/assets/fonts/plexesmediumpro.ttf 12 | Pods 13 | Podfile.lock 14 | -------------------------------------------------------------------------------- /DefaultIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/DefaultIcon.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015-2016 Hans Knoechel 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2 | 3 | Appcelerator Hyperloop based application to program for the Sphero iOS SDK. This project uses the native module [ti.sphero](https://github.com/hansemannn/ti.sphero) to communicate to the Sphero framework. This will also be bridged to Hyperloop in the new feature. 4 | 5 | ### Features 6 | 7 | - [x] Search devices automatically 8 | - [x] Save devices for later usages 9 | - [x] Drive the Sphero using your phone 10 | - [x] Change the Sphero LED color 11 | 12 | ### Technologies using Hyperloop 13 | 14 | - [x] RobotKit.framework (`RKRobotDiscovery`, `RKConvenienceRobot`, ...) 15 | - [x] Settings (`UITableView`) 16 | - [x] LED color-grid (`UICollectionView`) 17 | - [x] Content pages (`WKWebView`) 18 | - [x] Device control (`UIBezierPath`) 19 | 20 | ### Screenshots 21 | 22 | 23 | 24 | 25 | 26 | ### Author 27 | Hans Knoechel ([@hansemannnn](https://twitter.com/hansemannnn) / [Web](http://hans-knoechel.de)) x Appcelerator, Inc. 28 | 29 | ### License 30 | 31 | Apache 2 32 | 33 | Contributing 34 | --------------- 35 | Code contributions are greatly appriciated, please submit a pull request! Please note than I cannot merge commits before 2016/06/01, since this project is part of my bachelor thesis at the University of Applied Sciences Osnabrück (Germany). 36 | -------------------------------------------------------------------------------- /app/alloy.js: -------------------------------------------------------------------------------- 1 | require('tests/ti-mocha'); 2 | 3 | Alloy.Collections.device = Alloy.createCollection("device"); 4 | -------------------------------------------------------------------------------- /app/assets/commands/colorm.sphero: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/commands/colorm.sphero -------------------------------------------------------------------------------- /app/assets/commands/dance1.sphero: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/commands/dance1.sphero -------------------------------------------------------------------------------- /app/assets/fonts/README: -------------------------------------------------------------------------------- 1 | The "Plexes" font is not included in this project, since it needs to be licensed. -------------------------------------------------------------------------------- /app/assets/images/icons/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/arrow-right.png -------------------------------------------------------------------------------- /app/assets/images/icons/arrow-right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/arrow-right@2x.png -------------------------------------------------------------------------------- /app/assets/images/icons/connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/connected.png -------------------------------------------------------------------------------- /app/assets/images/icons/connected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/connected@2x.png -------------------------------------------------------------------------------- /app/assets/images/icons/disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/disconnected.png -------------------------------------------------------------------------------- /app/assets/images/icons/disconnected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/disconnected@2x.png -------------------------------------------------------------------------------- /app/assets/images/icons/features/colorize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/features/colorize.png -------------------------------------------------------------------------------- /app/assets/images/icons/features/colorize@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/features/colorize@2x.png -------------------------------------------------------------------------------- /app/assets/images/icons/features/drive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/features/drive.png -------------------------------------------------------------------------------- /app/assets/images/icons/features/drive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/features/drive@2x.png -------------------------------------------------------------------------------- /app/assets/images/icons/features/routes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/features/routes.png -------------------------------------------------------------------------------- /app/assets/images/icons/features/routes@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/features/routes@2x.png -------------------------------------------------------------------------------- /app/assets/images/icons/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/settings.png -------------------------------------------------------------------------------- /app/assets/images/icons/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/icons/settings@2x.png -------------------------------------------------------------------------------- /app/assets/images/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/images/logo@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/iphone/Default-568h@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/iphone/Default-667h@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Portrait-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/iphone/Default-Portrait-736h@3x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/iphone/Default-Portrait.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/iphone/Default-Portrait@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/iphone/Default@2x.png -------------------------------------------------------------------------------- /app/assets/nko_brightness_guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/nko_brightness_guide.png -------------------------------------------------------------------------------- /app/assets/nko_brightness_guide@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/nko_brightness_guide@2x.png -------------------------------------------------------------------------------- /app/assets/nko_colormap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/assets/nko_colormap.png -------------------------------------------------------------------------------- /app/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "styles": { 4 | "tintColor": "#c91326" 5 | } 6 | }, 7 | "env:development": {}, 8 | "env:test": {}, 9 | "env:production": {}, 10 | "os:android": {}, 11 | "os:blackberry": {}, 12 | "os:ios": {}, 13 | "os:mobileweb": {}, 14 | "os:windows": {}, 15 | "dependencies": { 16 | "com.appcelerator.robot.devicesearch": "1.0", 17 | "com.appcelerator.robot.devicelist": "1.0", 18 | "com.appcelerator.robot.devicedetails": "1.0", 19 | "com.appcelerator.robot.settings": "1.0" 20 | } 21 | } -------------------------------------------------------------------------------- /app/lib/tests/suites.js: -------------------------------------------------------------------------------- 1 | describe('PersistenceTest', function() { 2 | 3 | var devices = null; 4 | var initialTitle = 'Sphero #1'; 5 | var updatedTitle = 'Sphero #2'; 6 | var identifier = 'mocha-test'; 7 | var should = require('tests/should'); 8 | 9 | before(function() { 10 | devices = Alloy.Collections.instance('device'); 11 | }); 12 | 13 | it('#addDevice', function() { 14 | var device = Alloy.createModel('device', { 15 | title: initialTitle, 16 | identifier: identifier 17 | }); 18 | device.save(); 19 | devices.fetch(); 20 | 21 | var foundDevices = devices.where({ 22 | identifier: identifier 23 | }); 24 | 25 | should(foundDevices).not.be.undefined; 26 | should(foundDevices[0].get('title')).eql(initialTitle); 27 | }); 28 | 29 | it('#updateDevice', function() { 30 | var testModel = devices.where({ 31 | identifier: identifier 32 | })[0]; 33 | testModel.set('title', updatedTitle); 34 | testModel.save(); 35 | 36 | should(testModel.get('title')).eql(updatedTitle); 37 | }); 38 | 39 | it('#removeDevice', function() { 40 | var testModel = devices.where({ 41 | identifier: identifier 42 | })[0]; 43 | testModel.destroy(); 44 | }); 45 | 46 | after(function() { 47 | // Check something afterwards? 48 | }); 49 | }); -------------------------------------------------------------------------------- /app/models/device.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Defines a Sphero device 3 | */ 4 | exports.definition = { 5 | config : { 6 | "columns" : { 7 | "id" : "INTEGER PRIMARY KEY AUTOINCREMENT", 8 | "title" : "TEXT", 9 | "identifier" : "TEXT", 10 | "created_at" : "INTEGER", 11 | "connected" : "INTEGER" 12 | }, 13 | "defaults" : { 14 | "title" : "", 15 | "identifier" : "", 16 | "created_at" : 0, 17 | "connected" : 0 18 | }, 19 | "adapter" : { 20 | "type" : "sql", 21 | "idAttribute" : "id", 22 | "collection_name" : "devices" 23 | } 24 | }, 25 | 26 | extendModel : function(Model) { 27 | Model.prototype.toURL = function() { 28 | var url = ""; 29 | var proximity = JSON.parse(this.get("proximity")); 30 | var categories = JSON.parse(this.get("categories")); 31 | var tags = JSON.parse(this.get("tags")); 32 | 33 | // Add location data is available 34 | if (proximity.source.latitude && proximity.source.longitude) { 35 | url += "&proximity[source][latitude]=" + proximity.source.latitude; 36 | url += "&proximity[source][longitude]=" + proximity.source.longitude; 37 | 38 | url += "&proximity[radius]=" + proximity.radius; 39 | } 40 | 41 | // Concatenate categories 42 | _.each(categories, function(category, index) { 43 | url += "&categories[" + index + "]=" + category; 44 | }); 45 | 46 | // Concatenate tags 47 | _.each(tags, function(tag, index) { 48 | url += "&tags[" + index + "]=" + tag; 49 | }); 50 | 51 | return url; 52 | }; 53 | }, 54 | extendCollection : function(Collection) { 55 | Collection.prototype.destroyAll = function(opt) { 56 | var db = Ti.Database.open(this.config.adapter.db_name); 57 | db.execute("DELETE FROM " + this.config.adapter.collection_name); 58 | db.close(); 59 | this.models = []; 60 | if (!opt || !opt.silent) { 61 | this.trigger("reset"); 62 | } 63 | return this; 64 | }; 65 | } 66 | }; 67 | -------------------------------------------------------------------------------- /app/styles/app.tss: -------------------------------------------------------------------------------- 1 | "Window": { 2 | backgroundColor: "#222", 3 | backButtonTitle: "", 4 | translucent: false, 5 | barColor: "#000", 6 | navTintColor: Alloy.CFG.styles.tintColor, 7 | titleAttributes: { 8 | color: "#fff", 9 | font: { 10 | fontFamily: "PlexesMediumPro", 11 | fontSize: 20 12 | } 13 | } 14 | } 15 | 16 | "Label": { 17 | font: { 18 | fontFamily: "PlexesMediumPro", 19 | fontSize: 16 20 | } 21 | } 22 | 23 | "Button": { 24 | font: { 25 | fontFamily: "PlexesMediumPro", 26 | fontSize: 16 27 | } 28 | } 29 | 30 | "TextField": { 31 | font: { 32 | fontFamily: "PlexesMediumPro", 33 | fontSize: 16 34 | }, 35 | tintColor: Alloy.CFG.styles.tintColor 36 | } -------------------------------------------------------------------------------- /app/styles/index.tss: -------------------------------------------------------------------------------- 1 | "Window": { 2 | backgroundColor: "#fff" 3 | } 4 | -------------------------------------------------------------------------------- /app/views/index.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/controllers/drive/index.js: -------------------------------------------------------------------------------- 1 | var robot; 2 | 3 | /** 4 | * Constructor 5 | **/ 6 | (function constructor(args) { 7 | robot = args.robot; 8 | })(arguments[0] || {}); 9 | 10 | function driveForward() { 11 | drive(0, 0.5); 12 | } 13 | 14 | function driveRight() { 15 | drive(90, 0.5); 16 | } 17 | 18 | function driveBackward() { 19 | drive(180, 0.5); 20 | } 21 | 22 | function driveLeft() { 23 | drive(270, 0.5); 24 | } 25 | 26 | function drive(heading, velocity) { 27 | Ti.API.debug("Driving with heading = " + heading + " and velocity = " + velocity); 28 | robot.startDrivingWithHeadingAndVelocity(heading, velocity); 29 | } 30 | 31 | function stopDriving() { 32 | Ti.API.debug("Stopping ..."); 33 | robot.stopDriving(); 34 | } 35 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/controllers/routes/index.js: -------------------------------------------------------------------------------- 1 | var robot; 2 | 3 | /** 4 | * Constructor 5 | **/ 6 | (function constructor(args) { 7 | robot = args.robot; 8 | })(arguments[0] || {}); 9 | 10 | function executeTestCommand() { 11 | var file = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory(), "/commands/dance1.sphero"); 12 | robot.runMacro(file.resolve(), 1337); 13 | } 14 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/controllers/routes/routes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Constructor 3 | **/ 4 | (function constructor(args) { 5 | 6 | })(arguments[0] || {}); 7 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/controllers/widget.js: -------------------------------------------------------------------------------- 1 | var robot, 2 | nav; 3 | 4 | /** 5 | * Constructor 6 | **/ 7 | (function constructor(args) { 8 | nav = args.nav; 9 | robot = args.robot; 10 | 11 | setUI(); 12 | })(arguments[0] || {}); 13 | 14 | function setUI() { 15 | $.window.setTitle(robot.name); 16 | } 17 | 18 | function disconnectRobot() { 19 | robot.disconnect(); 20 | } 21 | 22 | function openFeature(e) { 23 | nav.openWindow(Widget.createController(e.itemId + "/index", { 24 | robot: robot 25 | }).getView()); 26 | } 27 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/styles/colorize/index.tss: -------------------------------------------------------------------------------- 1 | "#container": { 2 | layout: "horizontal", 3 | top: 0, 4 | contentWidth: Ti.UI.FILL, 5 | scrollType: "vertical" 6 | } 7 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/styles/drive/index.tss: -------------------------------------------------------------------------------- 1 | 2 | "Circle": { 3 | width: 300, 4 | height: 300 5 | } 6 | 7 | ".arrow": { 8 | width: 40, 9 | height: 40, 10 | bubbleParent: true 11 | } 12 | 13 | "#arrowTop": { 14 | top: 20 15 | } 16 | 17 | "#arrowRight": { 18 | right: 20 19 | } 20 | 21 | "#arrowBottom": { 22 | bottom: 20 23 | } 24 | 25 | "#arrowLeft": { 26 | left: 20 27 | } 28 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/styles/routes/index.tss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hansemannn/hyperloop-robot/4ae9c94532580d33818bce03309e87bb444c55d1/app/widgets/com.appcelerator.robot.devicedetails/styles/routes/index.tss -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/styles/widget.tss: -------------------------------------------------------------------------------- 1 | "#listView": { 2 | backgroundColor: "transparent", 3 | separatorStyle: Ti.UI.iPhone.ListViewSeparatorStyle.NONE, 4 | footerTitle: "" 5 | } 6 | 7 | "ListItem": { 8 | height: 130, 9 | backgroundColor: "transparent", 10 | selectionStyle: Ti.UI.iOS.ListViewCellSelectionStyle.NONE 11 | } 12 | 13 | ".featureContainer": { 14 | backgroundColor: "#fff", 15 | borderRadius: 4, 16 | top: 15, 17 | left: 15, 18 | right: 15 19 | } 20 | 21 | ".featureImage": { 22 | touchEnabled: false, 23 | tintColor: Alloy.CFG.styles.tintColor, 24 | left: 15, 25 | width: 60, 26 | height: 60 27 | } 28 | 29 | ".featureTitle": { 30 | font: { 31 | fontSize: 25, 32 | fontWeight: "bold" 33 | }, 34 | left: 90, 35 | height: Ti.UI.SIZE, 36 | color: "#333" 37 | } 38 | 39 | ".arrow": { 40 | right: 20, 41 | image: "images/icons/arrow-right.png", 42 | width: 12, 43 | height: 20 44 | } 45 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/views/colorize/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/views/drive/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/views/routes/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/widgets/com.appcelerator.robot.devicedetails/views/widget.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |