From 256e183f4f13e68ba2da2733df0f2dc9707e382b Mon Sep 17 00:00:00 2001 From: Erick Date: Wed, 20 Apr 2016 20:16:43 -0700 Subject: [PATCH 01/12] init Xcode --- .../project.pbxproj | 246 ++++++++++++++++++ micromouse-xcode/micromouse-xcode/main.cpp | 15 ++ .../contents.xcworkspacedata | 7 + 3 files changed, 268 insertions(+) create mode 100644 micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj create mode 100644 micromouse-xcode/micromouse-xcode/main.cpp create mode 100644 workspace.xcworkspace/contents.xcworkspacedata diff --git a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9d7c78e --- /dev/null +++ b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj @@ -0,0 +1,246 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + E1B489D01CC87D9300643A24 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489CF1CC87D9300643A24 /* main.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E1B489CA1CC87D9300643A24 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + E1B489CC1CC87D9300643A24 /* micromouse-xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "micromouse-xcode"; sourceTree = BUILT_PRODUCTS_DIR; }; + E1B489CF1CC87D9300643A24 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E1B489C91CC87D9300643A24 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E1B489C31CC87D9300643A24 = { + isa = PBXGroup; + children = ( + E1B489CE1CC87D9300643A24 /* micromouse-xcode */, + E1B489CD1CC87D9300643A24 /* Products */, + ); + sourceTree = ""; + }; + E1B489CD1CC87D9300643A24 /* Products */ = { + isa = PBXGroup; + children = ( + E1B489CC1CC87D9300643A24 /* micromouse-xcode */, + ); + name = Products; + sourceTree = ""; + }; + E1B489CE1CC87D9300643A24 /* micromouse-xcode */ = { + isa = PBXGroup; + children = ( + E1B489CF1CC87D9300643A24 /* main.cpp */, + ); + path = "micromouse-xcode"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E1B489CB1CC87D9300643A24 /* micromouse-xcode */ = { + isa = PBXNativeTarget; + buildConfigurationList = E1B489D31CC87D9300643A24 /* Build configuration list for PBXNativeTarget "micromouse-xcode" */; + buildPhases = ( + E1B489C81CC87D9300643A24 /* Sources */, + E1B489C91CC87D9300643A24 /* Frameworks */, + E1B489CA1CC87D9300643A24 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "micromouse-xcode"; + productName = "micromouse-xcode"; + productReference = E1B489CC1CC87D9300643A24 /* micromouse-xcode */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E1B489C41CC87D9300643A24 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "Erick Sanchez"; + TargetAttributes = { + E1B489CB1CC87D9300643A24 = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = E1B489C71CC87D9300643A24 /* Build configuration list for PBXProject "micromouse-xcode" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = E1B489C31CC87D9300643A24; + productRefGroup = E1B489CD1CC87D9300643A24 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E1B489CB1CC87D9300643A24 /* micromouse-xcode */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E1B489C81CC87D9300643A24 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E1B489D01CC87D9300643A24 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + E1B489D11CC87D9300643A24 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + E1B489D21CC87D9300643A24 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + E1B489D41CC87D9300643A24 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + E1B489D51CC87D9300643A24 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E1B489C71CC87D9300643A24 /* Build configuration list for PBXProject "micromouse-xcode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E1B489D11CC87D9300643A24 /* Debug */, + E1B489D21CC87D9300643A24 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E1B489D31CC87D9300643A24 /* Build configuration list for PBXNativeTarget "micromouse-xcode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E1B489D41CC87D9300643A24 /* Debug */, + E1B489D51CC87D9300643A24 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = E1B489C41CC87D9300643A24 /* Project object */; +} diff --git a/micromouse-xcode/micromouse-xcode/main.cpp b/micromouse-xcode/micromouse-xcode/main.cpp new file mode 100644 index 0000000..fe65143 --- /dev/null +++ b/micromouse-xcode/micromouse-xcode/main.cpp @@ -0,0 +1,15 @@ +// +// main.cpp +// micromouse-xcode +// +// Created by Erick Sanchez on 4/20/16. +// Copyright © 2016 Erick Sanchez. All rights reserved. +// + +#include + +int main(int argc, const char * argv[]) { + // insert code here... + std::cout << "Hello, World!\n"; + return 0; +} diff --git a/workspace.xcworkspace/contents.xcworkspacedata b/workspace.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4d01ba6 --- /dev/null +++ b/workspace.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + From 5d345a6a5d4a66b6349f3e1ed7ee363ce24fa3f2 Mon Sep 17 00:00:00 2001 From: Erick Date: Wed, 20 Apr 2016 20:21:23 -0700 Subject: [PATCH 02/12] import files into project --- .../project.pbxproj | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj index 9d7c78e..75142f0 100644 --- a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj +++ b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj @@ -8,6 +8,20 @@ /* Begin PBXBuildFile section */ E1B489D01CC87D9300643A24 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489CF1CC87D9300643A24 /* main.cpp */; }; + E1B489F71CC87E3D00643A24 /* Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489D91CC87E3D00643A24 /* Controller.cpp */; }; + E1B489F81CC87E3D00643A24 /* FlagMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */; }; + E1B489F91CC87E3D00643A24 /* IRSensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */; }; + E1B489FA1CC87E3D00643A24 /* Maze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E01CC87E3D00643A24 /* Maze.cpp */; }; + E1B489FB1CC87E3D00643A24 /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E21CC87E3D00643A24 /* Memory.cpp */; }; + E1B489FC1CC87E3D00643A24 /* Motor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E51CC87E3D00643A24 /* Motor.cpp */; }; + E1B489FD1CC87E3D00643A24 /* MouseBot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E71CC87E3D00643A24 /* MouseBot.cpp */; }; + E1B489FE1CC87E3D00643A24 /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E91CC87E3D00643A24 /* Node.cpp */; }; + E1B489FF1CC87E3D00643A24 /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489EB1CC87E3D00643A24 /* Path.cpp */; }; + E1B48A001CC87E3D00643A24 /* PIDController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489ED1CC87E3D00643A24 /* PIDController.cpp */; }; + E1B48A011CC87E3D00643A24 /* RobotIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */; }; + E1B48A021CC87E3D00643A24 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F11CC87E3D00643A24 /* Timer.cpp */; }; + E1B48A031CC87E3D00643A24 /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F31CC87E3D00643A24 /* Vector.cpp */; }; + E1B48A041CC87E3D00643A24 /* VirtualMaze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -25,6 +39,37 @@ /* Begin PBXFileReference section */ E1B489CC1CC87D9300643A24 /* micromouse-xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "micromouse-xcode"; sourceTree = BUILT_PRODUCTS_DIR; }; E1B489CF1CC87D9300643A24 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; + E1B489D81CC87E3D00643A24 /* callibration_temp */ = {isa = PBXFileReference; lastKnownFileType = folder; name = callibration_temp; path = ../../micromouse/callibration_temp; sourceTree = ""; }; + E1B489D91CC87E3D00643A24 /* Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Controller.cpp; path = ../../micromouse/Controller.cpp; sourceTree = ""; }; + E1B489DA1CC87E3D00643A24 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = ../../micromouse/Controller.h; sourceTree = ""; }; + E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FlagMatrix.cpp; path = ../../micromouse/FlagMatrix.cpp; sourceTree = ""; }; + E1B489DC1CC87E3D00643A24 /* FlagMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlagMatrix.h; path = ../../micromouse/FlagMatrix.h; sourceTree = ""; }; + E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRSensor.cpp; path = ../../micromouse/IRSensor.cpp; sourceTree = ""; }; + E1B489DE1CC87E3D00643A24 /* IRSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRSensor.h; path = ../../micromouse/IRSensor.h; sourceTree = ""; }; + E1B489DF1CC87E3D00643A24 /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logger.h; path = ../../micromouse/Logger.h; sourceTree = ""; }; + E1B489E01CC87E3D00643A24 /* Maze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Maze.cpp; path = ../../micromouse/Maze.cpp; sourceTree = ""; }; + E1B489E11CC87E3D00643A24 /* Maze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Maze.h; path = ../../micromouse/Maze.h; sourceTree = ""; }; + E1B489E21CC87E3D00643A24 /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Memory.cpp; path = ../../micromouse/Memory.cpp; sourceTree = ""; }; + E1B489E31CC87E3D00643A24 /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Memory.h; path = ../../micromouse/Memory.h; sourceTree = ""; }; + E1B489E41CC87E3D00643A24 /* micromouse.ino */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = micromouse.ino; path = ../../micromouse/micromouse.ino; sourceTree = ""; }; + E1B489E51CC87E3D00643A24 /* Motor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Motor.cpp; path = ../../micromouse/Motor.cpp; sourceTree = ""; }; + E1B489E61CC87E3D00643A24 /* Motor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Motor.h; path = ../../micromouse/Motor.h; sourceTree = ""; }; + E1B489E71CC87E3D00643A24 /* MouseBot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MouseBot.cpp; path = ../../micromouse/MouseBot.cpp; sourceTree = ""; }; + E1B489E81CC87E3D00643A24 /* MouseBot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MouseBot.h; path = ../../micromouse/MouseBot.h; sourceTree = ""; }; + E1B489E91CC87E3D00643A24 /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = ../../micromouse/Node.cpp; sourceTree = ""; }; + E1B489EA1CC87E3D00643A24 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = ../../micromouse/Node.h; sourceTree = ""; }; + E1B489EB1CC87E3D00643A24 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../../micromouse/Path.cpp; sourceTree = ""; }; + E1B489EC1CC87E3D00643A24 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Path.h; path = ../../micromouse/Path.h; sourceTree = ""; }; + E1B489ED1CC87E3D00643A24 /* PIDController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PIDController.cpp; path = ../../micromouse/PIDController.cpp; sourceTree = ""; }; + E1B489EE1CC87E3D00643A24 /* PIDController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PIDController.h; path = ../../micromouse/PIDController.h; sourceTree = ""; }; + E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RobotIO.cpp; path = ../../micromouse/RobotIO.cpp; sourceTree = ""; }; + E1B489F01CC87E3D00643A24 /* RobotIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RobotIO.h; path = ../../micromouse/RobotIO.h; sourceTree = ""; }; + E1B489F11CC87E3D00643A24 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../micromouse/Timer.cpp; sourceTree = ""; }; + E1B489F21CC87E3D00643A24 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../micromouse/Timer.h; sourceTree = ""; }; + E1B489F31CC87E3D00643A24 /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vector.cpp; path = ../../micromouse/Vector.cpp; sourceTree = ""; }; + E1B489F41CC87E3D00643A24 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector.h; path = ../../micromouse/Vector.h; sourceTree = ""; }; + E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VirtualMaze.cpp; path = ../../micromouse/VirtualMaze.cpp; sourceTree = ""; }; + E1B489F61CC87E3D00643A24 /* VirtualMaze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VirtualMaze.h; path = ../../micromouse/VirtualMaze.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -58,10 +103,49 @@ isa = PBXGroup; children = ( E1B489CF1CC87D9300643A24 /* main.cpp */, + E1B489D71CC87E2B00643A24 /* RES */, ); path = "micromouse-xcode"; sourceTree = ""; }; + E1B489D71CC87E2B00643A24 /* RES */ = { + isa = PBXGroup; + children = ( + E1B489D81CC87E3D00643A24 /* callibration_temp */, + E1B489D91CC87E3D00643A24 /* Controller.cpp */, + E1B489DA1CC87E3D00643A24 /* Controller.h */, + E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */, + E1B489DC1CC87E3D00643A24 /* FlagMatrix.h */, + E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */, + E1B489DE1CC87E3D00643A24 /* IRSensor.h */, + E1B489DF1CC87E3D00643A24 /* Logger.h */, + E1B489E01CC87E3D00643A24 /* Maze.cpp */, + E1B489E11CC87E3D00643A24 /* Maze.h */, + E1B489E21CC87E3D00643A24 /* Memory.cpp */, + E1B489E31CC87E3D00643A24 /* Memory.h */, + E1B489E41CC87E3D00643A24 /* micromouse.ino */, + E1B489E51CC87E3D00643A24 /* Motor.cpp */, + E1B489E61CC87E3D00643A24 /* Motor.h */, + E1B489E71CC87E3D00643A24 /* MouseBot.cpp */, + E1B489E81CC87E3D00643A24 /* MouseBot.h */, + E1B489E91CC87E3D00643A24 /* Node.cpp */, + E1B489EA1CC87E3D00643A24 /* Node.h */, + E1B489EB1CC87E3D00643A24 /* Path.cpp */, + E1B489EC1CC87E3D00643A24 /* Path.h */, + E1B489ED1CC87E3D00643A24 /* PIDController.cpp */, + E1B489EE1CC87E3D00643A24 /* PIDController.h */, + E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */, + E1B489F01CC87E3D00643A24 /* RobotIO.h */, + E1B489F11CC87E3D00643A24 /* Timer.cpp */, + E1B489F21CC87E3D00643A24 /* Timer.h */, + E1B489F31CC87E3D00643A24 /* Vector.cpp */, + E1B489F41CC87E3D00643A24 /* Vector.h */, + E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */, + E1B489F61CC87E3D00643A24 /* VirtualMaze.h */, + ); + name = RES; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -118,7 +202,21 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E1B489FE1CC87E3D00643A24 /* Node.cpp in Sources */, + E1B489FB1CC87E3D00643A24 /* Memory.cpp in Sources */, + E1B48A021CC87E3D00643A24 /* Timer.cpp in Sources */, E1B489D01CC87D9300643A24 /* main.cpp in Sources */, + E1B489F81CC87E3D00643A24 /* FlagMatrix.cpp in Sources */, + E1B48A001CC87E3D00643A24 /* PIDController.cpp in Sources */, + E1B489FF1CC87E3D00643A24 /* Path.cpp in Sources */, + E1B489FD1CC87E3D00643A24 /* MouseBot.cpp in Sources */, + E1B48A031CC87E3D00643A24 /* Vector.cpp in Sources */, + E1B489F91CC87E3D00643A24 /* IRSensor.cpp in Sources */, + E1B489F71CC87E3D00643A24 /* Controller.cpp in Sources */, + E1B48A041CC87E3D00643A24 /* VirtualMaze.cpp in Sources */, + E1B489FA1CC87E3D00643A24 /* Maze.cpp in Sources */, + E1B48A011CC87E3D00643A24 /* RobotIO.cpp in Sources */, + E1B489FC1CC87E3D00643A24 /* Motor.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 8468e906ec76c10d71350d1720b81dc0019fcbbd Mon Sep 17 00:00:00 2001 From: Erick Date: Wed, 20 Apr 2016 20:21:38 -0700 Subject: [PATCH 03/12] noone --- micromouse-xcode/micromouse-xcode/main.cpp | 33 ++++++++++++++-------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/micromouse-xcode/micromouse-xcode/main.cpp b/micromouse-xcode/micromouse-xcode/main.cpp index fe65143..cf4ff81 100644 --- a/micromouse-xcode/micromouse-xcode/main.cpp +++ b/micromouse-xcode/micromouse-xcode/main.cpp @@ -1,15 +1,26 @@ -// -// main.cpp -// micromouse-xcode -// -// Created by Erick Sanchez on 4/20/16. -// Copyright © 2016 Erick Sanchez. All rights reserved. -// +#include "Logger.h" +const LogLevel LOG_LEVEL = DEBUG2; + #include +#include +#include //time +#include "Controller.h" + + + +using namespace std; + + -int main(int argc, const char * argv[]) { - // insert code here... - std::cout << "Hello, World!\n"; +int main( int argc , char** argv ) +{ + //seed the random function + srand( (unsigned int)time( NULL ) ); + + Micromouse::Controller routine; + + system( "pause" ); + return 0; -} +} \ No newline at end of file From d228ccf5525ec797bcb1f629a4bec6e39fb5e2b0 Mon Sep 17 00:00:00 2001 From: Erick Date: Mon, 25 Apr 2016 19:08:54 -0700 Subject: [PATCH 04/12] assertion prototype --- .../project.pbxproj | 2 ++ micromouse/AssertionHandler.h | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 micromouse/AssertionHandler.h diff --git a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj index 75142f0..df536ac 100644 --- a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj +++ b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj @@ -70,6 +70,7 @@ E1B489F41CC87E3D00643A24 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector.h; path = ../../micromouse/Vector.h; sourceTree = ""; }; E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VirtualMaze.cpp; path = ../../micromouse/VirtualMaze.cpp; sourceTree = ""; }; E1B489F61CC87E3D00643A24 /* VirtualMaze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VirtualMaze.h; path = ../../micromouse/VirtualMaze.h; sourceTree = ""; }; + E1B48A051CC87FEE00643A24 /* AssertionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AssertionHandler.h; path = ../../micromouse/AssertionHandler.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -120,6 +121,7 @@ E1B489DE1CC87E3D00643A24 /* IRSensor.h */, E1B489DF1CC87E3D00643A24 /* Logger.h */, E1B489E01CC87E3D00643A24 /* Maze.cpp */, + E1B48A051CC87FEE00643A24 /* AssertionHandler.h */, E1B489E11CC87E3D00643A24 /* Maze.h */, E1B489E21CC87E3D00643A24 /* Memory.cpp */, E1B489E31CC87E3D00643A24 /* Memory.h */, diff --git a/micromouse/AssertionHandler.h b/micromouse/AssertionHandler.h new file mode 100644 index 0000000..b6fd3fb --- /dev/null +++ b/micromouse/AssertionHandler.h @@ -0,0 +1,32 @@ +// +// AssertionHandler.h +// micromouse-xcode +// +// Created by Erick Sanchez on 4/20/16. +// Copyright © 2016 Erick Sanchez. All rights reserved. +// + +#ifndef AssertionHandler_h +#define AssertionHandler_h + +#include "Logger.h" + +#ifdef __MK20DX256__ // Teensy Compile + +//Prints to concole using Logger(..) << code and metadata of the assertion +#define assertion(condition,code) \ +( \ +(__builtin_expect(!(condition), 0) ? (void)(Logger(ERROR)<<"("<<#condition<<")"<<" code: "< Date: Tue, 26 Apr 2016 10:56:46 -0700 Subject: [PATCH 05/12] fix : merges updated main.cpp --- .../project.pbxproj | 187 +++++++++--------- micromouse-xcode/micromouse-xcode/main.cpp | 2 +- micromouse/RobotIO.cpp | 2 +- 3 files changed, 97 insertions(+), 94 deletions(-) diff --git a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj index df536ac..c4e7a9f 100644 --- a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj +++ b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj @@ -7,21 +7,21 @@ objects = { /* Begin PBXBuildFile section */ + E12F981D1CCFE21C00A7209D /* Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F97FF1CCFE21C00A7209D /* Controller.cpp */; }; + E12F981E1CCFE21C00A7209D /* FlagMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98011CCFE21C00A7209D /* FlagMatrix.cpp */; }; + E12F981F1CCFE21C00A7209D /* IRSensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98031CCFE21C00A7209D /* IRSensor.cpp */; }; + E12F98201CCFE21C00A7209D /* Maze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98061CCFE21C00A7209D /* Maze.cpp */; }; + E12F98211CCFE21C00A7209D /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98081CCFE21C00A7209D /* Memory.cpp */; }; + E12F98221CCFE21C00A7209D /* Motor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F980B1CCFE21C00A7209D /* Motor.cpp */; }; + E12F98231CCFE21C00A7209D /* MouseBot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F980D1CCFE21C00A7209D /* MouseBot.cpp */; }; + E12F98241CCFE21C00A7209D /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F980F1CCFE21C00A7209D /* Node.cpp */; }; + E12F98251CCFE21C00A7209D /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98111CCFE21C00A7209D /* Path.cpp */; }; + E12F98261CCFE21C00A7209D /* PIDController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98131CCFE21C00A7209D /* PIDController.cpp */; }; + E12F98271CCFE21C00A7209D /* RobotIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98151CCFE21C00A7209D /* RobotIO.cpp */; }; + E12F98281CCFE21C00A7209D /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98171CCFE21C00A7209D /* Timer.cpp */; }; + E12F98291CCFE21C00A7209D /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98191CCFE21C00A7209D /* Vector.cpp */; }; + E12F982A1CCFE21C00A7209D /* VirtualMaze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F981B1CCFE21C00A7209D /* VirtualMaze.cpp */; }; E1B489D01CC87D9300643A24 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489CF1CC87D9300643A24 /* main.cpp */; }; - E1B489F71CC87E3D00643A24 /* Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489D91CC87E3D00643A24 /* Controller.cpp */; }; - E1B489F81CC87E3D00643A24 /* FlagMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */; }; - E1B489F91CC87E3D00643A24 /* IRSensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */; }; - E1B489FA1CC87E3D00643A24 /* Maze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E01CC87E3D00643A24 /* Maze.cpp */; }; - E1B489FB1CC87E3D00643A24 /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E21CC87E3D00643A24 /* Memory.cpp */; }; - E1B489FC1CC87E3D00643A24 /* Motor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E51CC87E3D00643A24 /* Motor.cpp */; }; - E1B489FD1CC87E3D00643A24 /* MouseBot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E71CC87E3D00643A24 /* MouseBot.cpp */; }; - E1B489FE1CC87E3D00643A24 /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E91CC87E3D00643A24 /* Node.cpp */; }; - E1B489FF1CC87E3D00643A24 /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489EB1CC87E3D00643A24 /* Path.cpp */; }; - E1B48A001CC87E3D00643A24 /* PIDController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489ED1CC87E3D00643A24 /* PIDController.cpp */; }; - E1B48A011CC87E3D00643A24 /* RobotIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */; }; - E1B48A021CC87E3D00643A24 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F11CC87E3D00643A24 /* Timer.cpp */; }; - E1B48A031CC87E3D00643A24 /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F31CC87E3D00643A24 /* Vector.cpp */; }; - E1B48A041CC87E3D00643A24 /* VirtualMaze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -37,40 +37,41 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + E12F97FC1CCFE21C00A7209D /* AssertionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AssertionHandler.h; path = ../../micromouse/AssertionHandler.h; sourceTree = ""; }; + E12F97FD1CCFE21C00A7209D /* ButtonFlag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonFlag.h; path = ../../micromouse/ButtonFlag.h; sourceTree = ""; }; + E12F97FE1CCFE21C00A7209D /* callibration_temp */ = {isa = PBXFileReference; lastKnownFileType = folder; name = callibration_temp; path = ../../micromouse/callibration_temp; sourceTree = ""; }; + E12F97FF1CCFE21C00A7209D /* Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Controller.cpp; path = ../../micromouse/Controller.cpp; sourceTree = ""; }; + E12F98001CCFE21C00A7209D /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = ../../micromouse/Controller.h; sourceTree = ""; }; + E12F98011CCFE21C00A7209D /* FlagMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FlagMatrix.cpp; path = ../../micromouse/FlagMatrix.cpp; sourceTree = ""; }; + E12F98021CCFE21C00A7209D /* FlagMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlagMatrix.h; path = ../../micromouse/FlagMatrix.h; sourceTree = ""; }; + E12F98031CCFE21C00A7209D /* IRSensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRSensor.cpp; path = ../../micromouse/IRSensor.cpp; sourceTree = ""; }; + E12F98041CCFE21C00A7209D /* IRSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRSensor.h; path = ../../micromouse/IRSensor.h; sourceTree = ""; }; + E12F98051CCFE21C00A7209D /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logger.h; path = ../../micromouse/Logger.h; sourceTree = ""; }; + E12F98061CCFE21C00A7209D /* Maze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Maze.cpp; path = ../../micromouse/Maze.cpp; sourceTree = ""; }; + E12F98071CCFE21C00A7209D /* Maze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Maze.h; path = ../../micromouse/Maze.h; sourceTree = ""; }; + E12F98081CCFE21C00A7209D /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Memory.cpp; path = ../../micromouse/Memory.cpp; sourceTree = ""; }; + E12F98091CCFE21C00A7209D /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Memory.h; path = ../../micromouse/Memory.h; sourceTree = ""; }; + E12F980A1CCFE21C00A7209D /* micromouse.ino */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = micromouse.ino; path = ../../micromouse/micromouse.ino; sourceTree = ""; }; + E12F980B1CCFE21C00A7209D /* Motor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Motor.cpp; path = ../../micromouse/Motor.cpp; sourceTree = ""; }; + E12F980C1CCFE21C00A7209D /* Motor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Motor.h; path = ../../micromouse/Motor.h; sourceTree = ""; }; + E12F980D1CCFE21C00A7209D /* MouseBot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MouseBot.cpp; path = ../../micromouse/MouseBot.cpp; sourceTree = ""; }; + E12F980E1CCFE21C00A7209D /* MouseBot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MouseBot.h; path = ../../micromouse/MouseBot.h; sourceTree = ""; }; + E12F980F1CCFE21C00A7209D /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = ../../micromouse/Node.cpp; sourceTree = ""; }; + E12F98101CCFE21C00A7209D /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = ../../micromouse/Node.h; sourceTree = ""; }; + E12F98111CCFE21C00A7209D /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../../micromouse/Path.cpp; sourceTree = ""; }; + E12F98121CCFE21C00A7209D /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Path.h; path = ../../micromouse/Path.h; sourceTree = ""; }; + E12F98131CCFE21C00A7209D /* PIDController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PIDController.cpp; path = ../../micromouse/PIDController.cpp; sourceTree = ""; }; + E12F98141CCFE21C00A7209D /* PIDController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PIDController.h; path = ../../micromouse/PIDController.h; sourceTree = ""; }; + E12F98151CCFE21C00A7209D /* RobotIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RobotIO.cpp; path = ../../micromouse/RobotIO.cpp; sourceTree = ""; }; + E12F98161CCFE21C00A7209D /* RobotIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RobotIO.h; path = ../../micromouse/RobotIO.h; sourceTree = ""; }; + E12F98171CCFE21C00A7209D /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../micromouse/Timer.cpp; sourceTree = ""; }; + E12F98181CCFE21C00A7209D /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../micromouse/Timer.h; sourceTree = ""; }; + E12F98191CCFE21C00A7209D /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vector.cpp; path = ../../micromouse/Vector.cpp; sourceTree = ""; }; + E12F981A1CCFE21C00A7209D /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector.h; path = ../../micromouse/Vector.h; sourceTree = ""; }; + E12F981B1CCFE21C00A7209D /* VirtualMaze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VirtualMaze.cpp; path = ../../micromouse/VirtualMaze.cpp; sourceTree = ""; }; + E12F981C1CCFE21C00A7209D /* VirtualMaze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VirtualMaze.h; path = ../../micromouse/VirtualMaze.h; sourceTree = ""; }; E1B489CC1CC87D9300643A24 /* micromouse-xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "micromouse-xcode"; sourceTree = BUILT_PRODUCTS_DIR; }; E1B489CF1CC87D9300643A24 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; - E1B489D81CC87E3D00643A24 /* callibration_temp */ = {isa = PBXFileReference; lastKnownFileType = folder; name = callibration_temp; path = ../../micromouse/callibration_temp; sourceTree = ""; }; - E1B489D91CC87E3D00643A24 /* Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Controller.cpp; path = ../../micromouse/Controller.cpp; sourceTree = ""; }; - E1B489DA1CC87E3D00643A24 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = ../../micromouse/Controller.h; sourceTree = ""; }; - E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FlagMatrix.cpp; path = ../../micromouse/FlagMatrix.cpp; sourceTree = ""; }; - E1B489DC1CC87E3D00643A24 /* FlagMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlagMatrix.h; path = ../../micromouse/FlagMatrix.h; sourceTree = ""; }; - E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRSensor.cpp; path = ../../micromouse/IRSensor.cpp; sourceTree = ""; }; - E1B489DE1CC87E3D00643A24 /* IRSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRSensor.h; path = ../../micromouse/IRSensor.h; sourceTree = ""; }; - E1B489DF1CC87E3D00643A24 /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logger.h; path = ../../micromouse/Logger.h; sourceTree = ""; }; - E1B489E01CC87E3D00643A24 /* Maze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Maze.cpp; path = ../../micromouse/Maze.cpp; sourceTree = ""; }; - E1B489E11CC87E3D00643A24 /* Maze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Maze.h; path = ../../micromouse/Maze.h; sourceTree = ""; }; - E1B489E21CC87E3D00643A24 /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Memory.cpp; path = ../../micromouse/Memory.cpp; sourceTree = ""; }; - E1B489E31CC87E3D00643A24 /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Memory.h; path = ../../micromouse/Memory.h; sourceTree = ""; }; - E1B489E41CC87E3D00643A24 /* micromouse.ino */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = micromouse.ino; path = ../../micromouse/micromouse.ino; sourceTree = ""; }; - E1B489E51CC87E3D00643A24 /* Motor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Motor.cpp; path = ../../micromouse/Motor.cpp; sourceTree = ""; }; - E1B489E61CC87E3D00643A24 /* Motor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Motor.h; path = ../../micromouse/Motor.h; sourceTree = ""; }; - E1B489E71CC87E3D00643A24 /* MouseBot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MouseBot.cpp; path = ../../micromouse/MouseBot.cpp; sourceTree = ""; }; - E1B489E81CC87E3D00643A24 /* MouseBot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MouseBot.h; path = ../../micromouse/MouseBot.h; sourceTree = ""; }; - E1B489E91CC87E3D00643A24 /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = ../../micromouse/Node.cpp; sourceTree = ""; }; - E1B489EA1CC87E3D00643A24 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = ../../micromouse/Node.h; sourceTree = ""; }; - E1B489EB1CC87E3D00643A24 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../../micromouse/Path.cpp; sourceTree = ""; }; - E1B489EC1CC87E3D00643A24 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Path.h; path = ../../micromouse/Path.h; sourceTree = ""; }; - E1B489ED1CC87E3D00643A24 /* PIDController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PIDController.cpp; path = ../../micromouse/PIDController.cpp; sourceTree = ""; }; - E1B489EE1CC87E3D00643A24 /* PIDController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PIDController.h; path = ../../micromouse/PIDController.h; sourceTree = ""; }; - E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RobotIO.cpp; path = ../../micromouse/RobotIO.cpp; sourceTree = ""; }; - E1B489F01CC87E3D00643A24 /* RobotIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RobotIO.h; path = ../../micromouse/RobotIO.h; sourceTree = ""; }; - E1B489F11CC87E3D00643A24 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../micromouse/Timer.cpp; sourceTree = ""; }; - E1B489F21CC87E3D00643A24 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../micromouse/Timer.h; sourceTree = ""; }; - E1B489F31CC87E3D00643A24 /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vector.cpp; path = ../../micromouse/Vector.cpp; sourceTree = ""; }; - E1B489F41CC87E3D00643A24 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector.h; path = ../../micromouse/Vector.h; sourceTree = ""; }; - E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VirtualMaze.cpp; path = ../../micromouse/VirtualMaze.cpp; sourceTree = ""; }; - E1B489F61CC87E3D00643A24 /* VirtualMaze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VirtualMaze.h; path = ../../micromouse/VirtualMaze.h; sourceTree = ""; }; - E1B48A051CC87FEE00643A24 /* AssertionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AssertionHandler.h; path = ../../micromouse/AssertionHandler.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -112,38 +113,39 @@ E1B489D71CC87E2B00643A24 /* RES */ = { isa = PBXGroup; children = ( - E1B489D81CC87E3D00643A24 /* callibration_temp */, - E1B489D91CC87E3D00643A24 /* Controller.cpp */, - E1B489DA1CC87E3D00643A24 /* Controller.h */, - E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */, - E1B489DC1CC87E3D00643A24 /* FlagMatrix.h */, - E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */, - E1B489DE1CC87E3D00643A24 /* IRSensor.h */, - E1B489DF1CC87E3D00643A24 /* Logger.h */, - E1B489E01CC87E3D00643A24 /* Maze.cpp */, - E1B48A051CC87FEE00643A24 /* AssertionHandler.h */, - E1B489E11CC87E3D00643A24 /* Maze.h */, - E1B489E21CC87E3D00643A24 /* Memory.cpp */, - E1B489E31CC87E3D00643A24 /* Memory.h */, - E1B489E41CC87E3D00643A24 /* micromouse.ino */, - E1B489E51CC87E3D00643A24 /* Motor.cpp */, - E1B489E61CC87E3D00643A24 /* Motor.h */, - E1B489E71CC87E3D00643A24 /* MouseBot.cpp */, - E1B489E81CC87E3D00643A24 /* MouseBot.h */, - E1B489E91CC87E3D00643A24 /* Node.cpp */, - E1B489EA1CC87E3D00643A24 /* Node.h */, - E1B489EB1CC87E3D00643A24 /* Path.cpp */, - E1B489EC1CC87E3D00643A24 /* Path.h */, - E1B489ED1CC87E3D00643A24 /* PIDController.cpp */, - E1B489EE1CC87E3D00643A24 /* PIDController.h */, - E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */, - E1B489F01CC87E3D00643A24 /* RobotIO.h */, - E1B489F11CC87E3D00643A24 /* Timer.cpp */, - E1B489F21CC87E3D00643A24 /* Timer.h */, - E1B489F31CC87E3D00643A24 /* Vector.cpp */, - E1B489F41CC87E3D00643A24 /* Vector.h */, - E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */, - E1B489F61CC87E3D00643A24 /* VirtualMaze.h */, + E12F97FC1CCFE21C00A7209D /* AssertionHandler.h */, + E12F97FD1CCFE21C00A7209D /* ButtonFlag.h */, + E12F97FE1CCFE21C00A7209D /* callibration_temp */, + E12F97FF1CCFE21C00A7209D /* Controller.cpp */, + E12F98001CCFE21C00A7209D /* Controller.h */, + E12F98011CCFE21C00A7209D /* FlagMatrix.cpp */, + E12F98021CCFE21C00A7209D /* FlagMatrix.h */, + E12F98031CCFE21C00A7209D /* IRSensor.cpp */, + E12F98041CCFE21C00A7209D /* IRSensor.h */, + E12F98051CCFE21C00A7209D /* Logger.h */, + E12F98061CCFE21C00A7209D /* Maze.cpp */, + E12F98071CCFE21C00A7209D /* Maze.h */, + E12F98081CCFE21C00A7209D /* Memory.cpp */, + E12F98091CCFE21C00A7209D /* Memory.h */, + E12F980A1CCFE21C00A7209D /* micromouse.ino */, + E12F980B1CCFE21C00A7209D /* Motor.cpp */, + E12F980C1CCFE21C00A7209D /* Motor.h */, + E12F980D1CCFE21C00A7209D /* MouseBot.cpp */, + E12F980E1CCFE21C00A7209D /* MouseBot.h */, + E12F980F1CCFE21C00A7209D /* Node.cpp */, + E12F98101CCFE21C00A7209D /* Node.h */, + E12F98111CCFE21C00A7209D /* Path.cpp */, + E12F98121CCFE21C00A7209D /* Path.h */, + E12F98131CCFE21C00A7209D /* PIDController.cpp */, + E12F98141CCFE21C00A7209D /* PIDController.h */, + E12F98151CCFE21C00A7209D /* RobotIO.cpp */, + E12F98161CCFE21C00A7209D /* RobotIO.h */, + E12F98171CCFE21C00A7209D /* Timer.cpp */, + E12F98181CCFE21C00A7209D /* Timer.h */, + E12F98191CCFE21C00A7209D /* Vector.cpp */, + E12F981A1CCFE21C00A7209D /* Vector.h */, + E12F981B1CCFE21C00A7209D /* VirtualMaze.cpp */, + E12F981C1CCFE21C00A7209D /* VirtualMaze.h */, ); name = RES; sourceTree = ""; @@ -204,21 +206,21 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E1B489FE1CC87E3D00643A24 /* Node.cpp in Sources */, - E1B489FB1CC87E3D00643A24 /* Memory.cpp in Sources */, - E1B48A021CC87E3D00643A24 /* Timer.cpp in Sources */, + E12F98241CCFE21C00A7209D /* Node.cpp in Sources */, + E12F98211CCFE21C00A7209D /* Memory.cpp in Sources */, + E12F98281CCFE21C00A7209D /* Timer.cpp in Sources */, E1B489D01CC87D9300643A24 /* main.cpp in Sources */, - E1B489F81CC87E3D00643A24 /* FlagMatrix.cpp in Sources */, - E1B48A001CC87E3D00643A24 /* PIDController.cpp in Sources */, - E1B489FF1CC87E3D00643A24 /* Path.cpp in Sources */, - E1B489FD1CC87E3D00643A24 /* MouseBot.cpp in Sources */, - E1B48A031CC87E3D00643A24 /* Vector.cpp in Sources */, - E1B489F91CC87E3D00643A24 /* IRSensor.cpp in Sources */, - E1B489F71CC87E3D00643A24 /* Controller.cpp in Sources */, - E1B48A041CC87E3D00643A24 /* VirtualMaze.cpp in Sources */, - E1B489FA1CC87E3D00643A24 /* Maze.cpp in Sources */, - E1B48A011CC87E3D00643A24 /* RobotIO.cpp in Sources */, - E1B489FC1CC87E3D00643A24 /* Motor.cpp in Sources */, + E12F981E1CCFE21C00A7209D /* FlagMatrix.cpp in Sources */, + E12F98261CCFE21C00A7209D /* PIDController.cpp in Sources */, + E12F98251CCFE21C00A7209D /* Path.cpp in Sources */, + E12F98231CCFE21C00A7209D /* MouseBot.cpp in Sources */, + E12F98291CCFE21C00A7209D /* Vector.cpp in Sources */, + E12F981F1CCFE21C00A7209D /* IRSensor.cpp in Sources */, + E12F981D1CCFE21C00A7209D /* Controller.cpp in Sources */, + E12F982A1CCFE21C00A7209D /* VirtualMaze.cpp in Sources */, + E12F98201CCFE21C00A7209D /* Maze.cpp in Sources */, + E12F98271CCFE21C00A7209D /* RobotIO.cpp in Sources */, + E12F98221CCFE21C00A7209D /* Motor.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -339,6 +341,7 @@ E1B489D51CC87D9300643A24 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/micromouse-xcode/micromouse-xcode/main.cpp b/micromouse-xcode/micromouse-xcode/main.cpp index cf4ff81..54deb46 100644 --- a/micromouse-xcode/micromouse-xcode/main.cpp +++ b/micromouse-xcode/micromouse-xcode/main.cpp @@ -11,7 +11,7 @@ const LogLevel LOG_LEVEL = DEBUG2; using namespace std; - +volatile bool buttonFlag; int main( int argc , char** argv ) { diff --git a/micromouse/RobotIO.cpp b/micromouse/RobotIO.cpp index 91bda74..2900d1d 100644 --- a/micromouse/RobotIO.cpp +++ b/micromouse/RobotIO.cpp @@ -95,7 +95,7 @@ namespace Micromouse { int dist = (int)IRSensors[FRONT_LEFT]->getDistance(); - return (dist < 120 && abs(dist - IRSensors[FRONT_RIGHT]->getDistance()) < 30); + return (dist < 120 && abs(dist - IRSensors[FRONT_RIGHT]->getDistance()) < 30); } default: From f6392e4d5437953432026487a87a9f79a01c2f62 Mon Sep 17 00:00:00 2001 From: Erick Date: Tue, 26 Apr 2016 13:00:41 -0700 Subject: [PATCH 06/12] Read and write to Memory --- micromouse/AssertionHandler.h | 18 ++++++++++++++++-- micromouse/Memory.h | 15 +++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/micromouse/AssertionHandler.h b/micromouse/AssertionHandler.h index b6fd3fb..03232cf 100644 --- a/micromouse/AssertionHandler.h +++ b/micromouse/AssertionHandler.h @@ -9,14 +9,28 @@ #ifndef AssertionHandler_h #define AssertionHandler_h -#include "Logger.h" +#include "Memory.h" #ifdef __MK20DX256__ // Teensy Compile +inline static void logError( int code ) { + if (Micromouse::Memory::read(Micromouse::ERROR_MEMORY)) //Validate if ERROR_MEMORY has been initilized + Micromouse::Memory::write(Micromouse::ERROR_MEMORY, 0); + //Read and increment to the next error state, as well as validate to loop back to 1 if incremented to 21 + int intNextIndex = Micromouse::Memory::read(Micromouse::ERROR_MEMORY) +1; + intNextIndex = intNextIndex > 20 ? 1 : intNextIndex; + + //Find next state address and save code as well as the most recent error state in ERROR_MEMORY + int intNextStateAddress = Micromouse::ERROR_MEMORY +intNextIndex * 4; + Micromouse::Memory::write( intNextStateAddress, 15); + Micromouse::Memory::write( Micromouse::ERROR_MEMORY, intNextIndex); + +} + //Prints to concole using Logger(..) << code and metadata of the assertion #define assertion(condition,code) \ ( \ -(__builtin_expect(!(condition), 0) ? (void)(Logger(ERROR)<<"("<<#condition<<")"<<" code: "< Date: Tue, 26 Apr 2016 15:21:16 -0700 Subject: [PATCH 07/12] remove xcode project files --- .../project.pbxproj | 346 ------------------ micromouse-xcode/micromouse-xcode/main.cpp | 26 -- 2 files changed, 372 deletions(-) delete mode 100644 micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj delete mode 100644 micromouse-xcode/micromouse-xcode/main.cpp diff --git a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj deleted file mode 100644 index df536ac..0000000 --- a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj +++ /dev/null @@ -1,346 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - E1B489D01CC87D9300643A24 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489CF1CC87D9300643A24 /* main.cpp */; }; - E1B489F71CC87E3D00643A24 /* Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489D91CC87E3D00643A24 /* Controller.cpp */; }; - E1B489F81CC87E3D00643A24 /* FlagMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */; }; - E1B489F91CC87E3D00643A24 /* IRSensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */; }; - E1B489FA1CC87E3D00643A24 /* Maze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E01CC87E3D00643A24 /* Maze.cpp */; }; - E1B489FB1CC87E3D00643A24 /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E21CC87E3D00643A24 /* Memory.cpp */; }; - E1B489FC1CC87E3D00643A24 /* Motor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E51CC87E3D00643A24 /* Motor.cpp */; }; - E1B489FD1CC87E3D00643A24 /* MouseBot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E71CC87E3D00643A24 /* MouseBot.cpp */; }; - E1B489FE1CC87E3D00643A24 /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489E91CC87E3D00643A24 /* Node.cpp */; }; - E1B489FF1CC87E3D00643A24 /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489EB1CC87E3D00643A24 /* Path.cpp */; }; - E1B48A001CC87E3D00643A24 /* PIDController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489ED1CC87E3D00643A24 /* PIDController.cpp */; }; - E1B48A011CC87E3D00643A24 /* RobotIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */; }; - E1B48A021CC87E3D00643A24 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F11CC87E3D00643A24 /* Timer.cpp */; }; - E1B48A031CC87E3D00643A24 /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F31CC87E3D00643A24 /* Vector.cpp */; }; - E1B48A041CC87E3D00643A24 /* VirtualMaze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - E1B489CA1CC87D9300643A24 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - E1B489CC1CC87D9300643A24 /* micromouse-xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "micromouse-xcode"; sourceTree = BUILT_PRODUCTS_DIR; }; - E1B489CF1CC87D9300643A24 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; - E1B489D81CC87E3D00643A24 /* callibration_temp */ = {isa = PBXFileReference; lastKnownFileType = folder; name = callibration_temp; path = ../../micromouse/callibration_temp; sourceTree = ""; }; - E1B489D91CC87E3D00643A24 /* Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Controller.cpp; path = ../../micromouse/Controller.cpp; sourceTree = ""; }; - E1B489DA1CC87E3D00643A24 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = ../../micromouse/Controller.h; sourceTree = ""; }; - E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FlagMatrix.cpp; path = ../../micromouse/FlagMatrix.cpp; sourceTree = ""; }; - E1B489DC1CC87E3D00643A24 /* FlagMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlagMatrix.h; path = ../../micromouse/FlagMatrix.h; sourceTree = ""; }; - E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRSensor.cpp; path = ../../micromouse/IRSensor.cpp; sourceTree = ""; }; - E1B489DE1CC87E3D00643A24 /* IRSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRSensor.h; path = ../../micromouse/IRSensor.h; sourceTree = ""; }; - E1B489DF1CC87E3D00643A24 /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logger.h; path = ../../micromouse/Logger.h; sourceTree = ""; }; - E1B489E01CC87E3D00643A24 /* Maze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Maze.cpp; path = ../../micromouse/Maze.cpp; sourceTree = ""; }; - E1B489E11CC87E3D00643A24 /* Maze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Maze.h; path = ../../micromouse/Maze.h; sourceTree = ""; }; - E1B489E21CC87E3D00643A24 /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Memory.cpp; path = ../../micromouse/Memory.cpp; sourceTree = ""; }; - E1B489E31CC87E3D00643A24 /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Memory.h; path = ../../micromouse/Memory.h; sourceTree = ""; }; - E1B489E41CC87E3D00643A24 /* micromouse.ino */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = micromouse.ino; path = ../../micromouse/micromouse.ino; sourceTree = ""; }; - E1B489E51CC87E3D00643A24 /* Motor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Motor.cpp; path = ../../micromouse/Motor.cpp; sourceTree = ""; }; - E1B489E61CC87E3D00643A24 /* Motor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Motor.h; path = ../../micromouse/Motor.h; sourceTree = ""; }; - E1B489E71CC87E3D00643A24 /* MouseBot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MouseBot.cpp; path = ../../micromouse/MouseBot.cpp; sourceTree = ""; }; - E1B489E81CC87E3D00643A24 /* MouseBot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MouseBot.h; path = ../../micromouse/MouseBot.h; sourceTree = ""; }; - E1B489E91CC87E3D00643A24 /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = ../../micromouse/Node.cpp; sourceTree = ""; }; - E1B489EA1CC87E3D00643A24 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = ../../micromouse/Node.h; sourceTree = ""; }; - E1B489EB1CC87E3D00643A24 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../../micromouse/Path.cpp; sourceTree = ""; }; - E1B489EC1CC87E3D00643A24 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Path.h; path = ../../micromouse/Path.h; sourceTree = ""; }; - E1B489ED1CC87E3D00643A24 /* PIDController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PIDController.cpp; path = ../../micromouse/PIDController.cpp; sourceTree = ""; }; - E1B489EE1CC87E3D00643A24 /* PIDController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PIDController.h; path = ../../micromouse/PIDController.h; sourceTree = ""; }; - E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RobotIO.cpp; path = ../../micromouse/RobotIO.cpp; sourceTree = ""; }; - E1B489F01CC87E3D00643A24 /* RobotIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RobotIO.h; path = ../../micromouse/RobotIO.h; sourceTree = ""; }; - E1B489F11CC87E3D00643A24 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../micromouse/Timer.cpp; sourceTree = ""; }; - E1B489F21CC87E3D00643A24 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../micromouse/Timer.h; sourceTree = ""; }; - E1B489F31CC87E3D00643A24 /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vector.cpp; path = ../../micromouse/Vector.cpp; sourceTree = ""; }; - E1B489F41CC87E3D00643A24 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector.h; path = ../../micromouse/Vector.h; sourceTree = ""; }; - E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VirtualMaze.cpp; path = ../../micromouse/VirtualMaze.cpp; sourceTree = ""; }; - E1B489F61CC87E3D00643A24 /* VirtualMaze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VirtualMaze.h; path = ../../micromouse/VirtualMaze.h; sourceTree = ""; }; - E1B48A051CC87FEE00643A24 /* AssertionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AssertionHandler.h; path = ../../micromouse/AssertionHandler.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E1B489C91CC87D9300643A24 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - E1B489C31CC87D9300643A24 = { - isa = PBXGroup; - children = ( - E1B489CE1CC87D9300643A24 /* micromouse-xcode */, - E1B489CD1CC87D9300643A24 /* Products */, - ); - sourceTree = ""; - }; - E1B489CD1CC87D9300643A24 /* Products */ = { - isa = PBXGroup; - children = ( - E1B489CC1CC87D9300643A24 /* micromouse-xcode */, - ); - name = Products; - sourceTree = ""; - }; - E1B489CE1CC87D9300643A24 /* micromouse-xcode */ = { - isa = PBXGroup; - children = ( - E1B489CF1CC87D9300643A24 /* main.cpp */, - E1B489D71CC87E2B00643A24 /* RES */, - ); - path = "micromouse-xcode"; - sourceTree = ""; - }; - E1B489D71CC87E2B00643A24 /* RES */ = { - isa = PBXGroup; - children = ( - E1B489D81CC87E3D00643A24 /* callibration_temp */, - E1B489D91CC87E3D00643A24 /* Controller.cpp */, - E1B489DA1CC87E3D00643A24 /* Controller.h */, - E1B489DB1CC87E3D00643A24 /* FlagMatrix.cpp */, - E1B489DC1CC87E3D00643A24 /* FlagMatrix.h */, - E1B489DD1CC87E3D00643A24 /* IRSensor.cpp */, - E1B489DE1CC87E3D00643A24 /* IRSensor.h */, - E1B489DF1CC87E3D00643A24 /* Logger.h */, - E1B489E01CC87E3D00643A24 /* Maze.cpp */, - E1B48A051CC87FEE00643A24 /* AssertionHandler.h */, - E1B489E11CC87E3D00643A24 /* Maze.h */, - E1B489E21CC87E3D00643A24 /* Memory.cpp */, - E1B489E31CC87E3D00643A24 /* Memory.h */, - E1B489E41CC87E3D00643A24 /* micromouse.ino */, - E1B489E51CC87E3D00643A24 /* Motor.cpp */, - E1B489E61CC87E3D00643A24 /* Motor.h */, - E1B489E71CC87E3D00643A24 /* MouseBot.cpp */, - E1B489E81CC87E3D00643A24 /* MouseBot.h */, - E1B489E91CC87E3D00643A24 /* Node.cpp */, - E1B489EA1CC87E3D00643A24 /* Node.h */, - E1B489EB1CC87E3D00643A24 /* Path.cpp */, - E1B489EC1CC87E3D00643A24 /* Path.h */, - E1B489ED1CC87E3D00643A24 /* PIDController.cpp */, - E1B489EE1CC87E3D00643A24 /* PIDController.h */, - E1B489EF1CC87E3D00643A24 /* RobotIO.cpp */, - E1B489F01CC87E3D00643A24 /* RobotIO.h */, - E1B489F11CC87E3D00643A24 /* Timer.cpp */, - E1B489F21CC87E3D00643A24 /* Timer.h */, - E1B489F31CC87E3D00643A24 /* Vector.cpp */, - E1B489F41CC87E3D00643A24 /* Vector.h */, - E1B489F51CC87E3D00643A24 /* VirtualMaze.cpp */, - E1B489F61CC87E3D00643A24 /* VirtualMaze.h */, - ); - name = RES; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E1B489CB1CC87D9300643A24 /* micromouse-xcode */ = { - isa = PBXNativeTarget; - buildConfigurationList = E1B489D31CC87D9300643A24 /* Build configuration list for PBXNativeTarget "micromouse-xcode" */; - buildPhases = ( - E1B489C81CC87D9300643A24 /* Sources */, - E1B489C91CC87D9300643A24 /* Frameworks */, - E1B489CA1CC87D9300643A24 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "micromouse-xcode"; - productName = "micromouse-xcode"; - productReference = E1B489CC1CC87D9300643A24 /* micromouse-xcode */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E1B489C41CC87D9300643A24 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0730; - ORGANIZATIONNAME = "Erick Sanchez"; - TargetAttributes = { - E1B489CB1CC87D9300643A24 = { - CreatedOnToolsVersion = 7.3; - }; - }; - }; - buildConfigurationList = E1B489C71CC87D9300643A24 /* Build configuration list for PBXProject "micromouse-xcode" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = E1B489C31CC87D9300643A24; - productRefGroup = E1B489CD1CC87D9300643A24 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E1B489CB1CC87D9300643A24 /* micromouse-xcode */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E1B489C81CC87D9300643A24 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E1B489FE1CC87E3D00643A24 /* Node.cpp in Sources */, - E1B489FB1CC87E3D00643A24 /* Memory.cpp in Sources */, - E1B48A021CC87E3D00643A24 /* Timer.cpp in Sources */, - E1B489D01CC87D9300643A24 /* main.cpp in Sources */, - E1B489F81CC87E3D00643A24 /* FlagMatrix.cpp in Sources */, - E1B48A001CC87E3D00643A24 /* PIDController.cpp in Sources */, - E1B489FF1CC87E3D00643A24 /* Path.cpp in Sources */, - E1B489FD1CC87E3D00643A24 /* MouseBot.cpp in Sources */, - E1B48A031CC87E3D00643A24 /* Vector.cpp in Sources */, - E1B489F91CC87E3D00643A24 /* IRSensor.cpp in Sources */, - E1B489F71CC87E3D00643A24 /* Controller.cpp in Sources */, - E1B48A041CC87E3D00643A24 /* VirtualMaze.cpp in Sources */, - E1B489FA1CC87E3D00643A24 /* Maze.cpp in Sources */, - E1B48A011CC87E3D00643A24 /* RobotIO.cpp in Sources */, - E1B489FC1CC87E3D00643A24 /* Motor.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - E1B489D11CC87D9300643A24 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - E1B489D21CC87D9300643A24 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - }; - name = Release; - }; - E1B489D41CC87D9300643A24 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - E1B489D51CC87D9300643A24 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E1B489C71CC87D9300643A24 /* Build configuration list for PBXProject "micromouse-xcode" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E1B489D11CC87D9300643A24 /* Debug */, - E1B489D21CC87D9300643A24 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E1B489D31CC87D9300643A24 /* Build configuration list for PBXNativeTarget "micromouse-xcode" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E1B489D41CC87D9300643A24 /* Debug */, - E1B489D51CC87D9300643A24 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = E1B489C41CC87D9300643A24 /* Project object */; -} diff --git a/micromouse-xcode/micromouse-xcode/main.cpp b/micromouse-xcode/micromouse-xcode/main.cpp deleted file mode 100644 index cf4ff81..0000000 --- a/micromouse-xcode/micromouse-xcode/main.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "Logger.h" -const LogLevel LOG_LEVEL = DEBUG2; - - -#include -#include -#include //time -#include "Controller.h" - - - -using namespace std; - - - -int main( int argc , char** argv ) -{ - //seed the random function - srand( (unsigned int)time( NULL ) ); - - Micromouse::Controller routine; - - system( "pause" ); - - return 0; -} \ No newline at end of file From f16d0935cb514e2f2a32890b1d14539c56507906 Mon Sep 17 00:00:00 2001 From: Erick Date: Tue, 26 Apr 2016 16:12:20 -0700 Subject: [PATCH 08/12] fix : typo --- micromouse/AssertionHandler.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/micromouse/AssertionHandler.h b/micromouse/AssertionHandler.h index 03232cf..b3c0f92 100644 --- a/micromouse/AssertionHandler.h +++ b/micromouse/AssertionHandler.h @@ -14,15 +14,13 @@ #ifdef __MK20DX256__ // Teensy Compile inline static void logError( int code ) { - if (Micromouse::Memory::read(Micromouse::ERROR_MEMORY)) //Validate if ERROR_MEMORY has been initilized - Micromouse::Memory::write(Micromouse::ERROR_MEMORY, 0); //Read and increment to the next error state, as well as validate to loop back to 1 if incremented to 21 int intNextIndex = Micromouse::Memory::read(Micromouse::ERROR_MEMORY) +1; intNextIndex = intNextIndex > 20 ? 1 : intNextIndex; //Find next state address and save code as well as the most recent error state in ERROR_MEMORY int intNextStateAddress = Micromouse::ERROR_MEMORY +intNextIndex * 4; - Micromouse::Memory::write( intNextStateAddress, 15); + Micromouse::Memory::write( intNextStateAddress, code); Micromouse::Memory::write( Micromouse::ERROR_MEMORY, intNextIndex); } From b40ca16cb5ef8d2afef9ff3a9dfa431a477e3a9f Mon Sep 17 00:00:00 2001 From: Erick Date: Thu, 2 Jun 2016 12:32:28 -0700 Subject: [PATCH 09/12] Removed micromouse-xcode Folder --- .../project.pbxproj | 349 ------------------ micromouse-xcode/micromouse-xcode/main.cpp | 26 -- 2 files changed, 375 deletions(-) delete mode 100644 micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj delete mode 100644 micromouse-xcode/micromouse-xcode/main.cpp diff --git a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj b/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj deleted file mode 100644 index c4e7a9f..0000000 --- a/micromouse-xcode/micromouse-xcode.xcodeproj/project.pbxproj +++ /dev/null @@ -1,349 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - E12F981D1CCFE21C00A7209D /* Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F97FF1CCFE21C00A7209D /* Controller.cpp */; }; - E12F981E1CCFE21C00A7209D /* FlagMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98011CCFE21C00A7209D /* FlagMatrix.cpp */; }; - E12F981F1CCFE21C00A7209D /* IRSensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98031CCFE21C00A7209D /* IRSensor.cpp */; }; - E12F98201CCFE21C00A7209D /* Maze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98061CCFE21C00A7209D /* Maze.cpp */; }; - E12F98211CCFE21C00A7209D /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98081CCFE21C00A7209D /* Memory.cpp */; }; - E12F98221CCFE21C00A7209D /* Motor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F980B1CCFE21C00A7209D /* Motor.cpp */; }; - E12F98231CCFE21C00A7209D /* MouseBot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F980D1CCFE21C00A7209D /* MouseBot.cpp */; }; - E12F98241CCFE21C00A7209D /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F980F1CCFE21C00A7209D /* Node.cpp */; }; - E12F98251CCFE21C00A7209D /* Path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98111CCFE21C00A7209D /* Path.cpp */; }; - E12F98261CCFE21C00A7209D /* PIDController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98131CCFE21C00A7209D /* PIDController.cpp */; }; - E12F98271CCFE21C00A7209D /* RobotIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98151CCFE21C00A7209D /* RobotIO.cpp */; }; - E12F98281CCFE21C00A7209D /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98171CCFE21C00A7209D /* Timer.cpp */; }; - E12F98291CCFE21C00A7209D /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F98191CCFE21C00A7209D /* Vector.cpp */; }; - E12F982A1CCFE21C00A7209D /* VirtualMaze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12F981B1CCFE21C00A7209D /* VirtualMaze.cpp */; }; - E1B489D01CC87D9300643A24 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489CF1CC87D9300643A24 /* main.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - E1B489CA1CC87D9300643A24 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - E12F97FC1CCFE21C00A7209D /* AssertionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AssertionHandler.h; path = ../../micromouse/AssertionHandler.h; sourceTree = ""; }; - E12F97FD1CCFE21C00A7209D /* ButtonFlag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonFlag.h; path = ../../micromouse/ButtonFlag.h; sourceTree = ""; }; - E12F97FE1CCFE21C00A7209D /* callibration_temp */ = {isa = PBXFileReference; lastKnownFileType = folder; name = callibration_temp; path = ../../micromouse/callibration_temp; sourceTree = ""; }; - E12F97FF1CCFE21C00A7209D /* Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Controller.cpp; path = ../../micromouse/Controller.cpp; sourceTree = ""; }; - E12F98001CCFE21C00A7209D /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Controller.h; path = ../../micromouse/Controller.h; sourceTree = ""; }; - E12F98011CCFE21C00A7209D /* FlagMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FlagMatrix.cpp; path = ../../micromouse/FlagMatrix.cpp; sourceTree = ""; }; - E12F98021CCFE21C00A7209D /* FlagMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlagMatrix.h; path = ../../micromouse/FlagMatrix.h; sourceTree = ""; }; - E12F98031CCFE21C00A7209D /* IRSensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRSensor.cpp; path = ../../micromouse/IRSensor.cpp; sourceTree = ""; }; - E12F98041CCFE21C00A7209D /* IRSensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRSensor.h; path = ../../micromouse/IRSensor.h; sourceTree = ""; }; - E12F98051CCFE21C00A7209D /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logger.h; path = ../../micromouse/Logger.h; sourceTree = ""; }; - E12F98061CCFE21C00A7209D /* Maze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Maze.cpp; path = ../../micromouse/Maze.cpp; sourceTree = ""; }; - E12F98071CCFE21C00A7209D /* Maze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Maze.h; path = ../../micromouse/Maze.h; sourceTree = ""; }; - E12F98081CCFE21C00A7209D /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Memory.cpp; path = ../../micromouse/Memory.cpp; sourceTree = ""; }; - E12F98091CCFE21C00A7209D /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Memory.h; path = ../../micromouse/Memory.h; sourceTree = ""; }; - E12F980A1CCFE21C00A7209D /* micromouse.ino */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = micromouse.ino; path = ../../micromouse/micromouse.ino; sourceTree = ""; }; - E12F980B1CCFE21C00A7209D /* Motor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Motor.cpp; path = ../../micromouse/Motor.cpp; sourceTree = ""; }; - E12F980C1CCFE21C00A7209D /* Motor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Motor.h; path = ../../micromouse/Motor.h; sourceTree = ""; }; - E12F980D1CCFE21C00A7209D /* MouseBot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MouseBot.cpp; path = ../../micromouse/MouseBot.cpp; sourceTree = ""; }; - E12F980E1CCFE21C00A7209D /* MouseBot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MouseBot.h; path = ../../micromouse/MouseBot.h; sourceTree = ""; }; - E12F980F1CCFE21C00A7209D /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = ../../micromouse/Node.cpp; sourceTree = ""; }; - E12F98101CCFE21C00A7209D /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = ../../micromouse/Node.h; sourceTree = ""; }; - E12F98111CCFE21C00A7209D /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Path.cpp; path = ../../micromouse/Path.cpp; sourceTree = ""; }; - E12F98121CCFE21C00A7209D /* Path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Path.h; path = ../../micromouse/Path.h; sourceTree = ""; }; - E12F98131CCFE21C00A7209D /* PIDController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PIDController.cpp; path = ../../micromouse/PIDController.cpp; sourceTree = ""; }; - E12F98141CCFE21C00A7209D /* PIDController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PIDController.h; path = ../../micromouse/PIDController.h; sourceTree = ""; }; - E12F98151CCFE21C00A7209D /* RobotIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RobotIO.cpp; path = ../../micromouse/RobotIO.cpp; sourceTree = ""; }; - E12F98161CCFE21C00A7209D /* RobotIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RobotIO.h; path = ../../micromouse/RobotIO.h; sourceTree = ""; }; - E12F98171CCFE21C00A7209D /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../micromouse/Timer.cpp; sourceTree = ""; }; - E12F98181CCFE21C00A7209D /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../micromouse/Timer.h; sourceTree = ""; }; - E12F98191CCFE21C00A7209D /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vector.cpp; path = ../../micromouse/Vector.cpp; sourceTree = ""; }; - E12F981A1CCFE21C00A7209D /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector.h; path = ../../micromouse/Vector.h; sourceTree = ""; }; - E12F981B1CCFE21C00A7209D /* VirtualMaze.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VirtualMaze.cpp; path = ../../micromouse/VirtualMaze.cpp; sourceTree = ""; }; - E12F981C1CCFE21C00A7209D /* VirtualMaze.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VirtualMaze.h; path = ../../micromouse/VirtualMaze.h; sourceTree = ""; }; - E1B489CC1CC87D9300643A24 /* micromouse-xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "micromouse-xcode"; sourceTree = BUILT_PRODUCTS_DIR; }; - E1B489CF1CC87D9300643A24 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E1B489C91CC87D9300643A24 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - E1B489C31CC87D9300643A24 = { - isa = PBXGroup; - children = ( - E1B489CE1CC87D9300643A24 /* micromouse-xcode */, - E1B489CD1CC87D9300643A24 /* Products */, - ); - sourceTree = ""; - }; - E1B489CD1CC87D9300643A24 /* Products */ = { - isa = PBXGroup; - children = ( - E1B489CC1CC87D9300643A24 /* micromouse-xcode */, - ); - name = Products; - sourceTree = ""; - }; - E1B489CE1CC87D9300643A24 /* micromouse-xcode */ = { - isa = PBXGroup; - children = ( - E1B489CF1CC87D9300643A24 /* main.cpp */, - E1B489D71CC87E2B00643A24 /* RES */, - ); - path = "micromouse-xcode"; - sourceTree = ""; - }; - E1B489D71CC87E2B00643A24 /* RES */ = { - isa = PBXGroup; - children = ( - E12F97FC1CCFE21C00A7209D /* AssertionHandler.h */, - E12F97FD1CCFE21C00A7209D /* ButtonFlag.h */, - E12F97FE1CCFE21C00A7209D /* callibration_temp */, - E12F97FF1CCFE21C00A7209D /* Controller.cpp */, - E12F98001CCFE21C00A7209D /* Controller.h */, - E12F98011CCFE21C00A7209D /* FlagMatrix.cpp */, - E12F98021CCFE21C00A7209D /* FlagMatrix.h */, - E12F98031CCFE21C00A7209D /* IRSensor.cpp */, - E12F98041CCFE21C00A7209D /* IRSensor.h */, - E12F98051CCFE21C00A7209D /* Logger.h */, - E12F98061CCFE21C00A7209D /* Maze.cpp */, - E12F98071CCFE21C00A7209D /* Maze.h */, - E12F98081CCFE21C00A7209D /* Memory.cpp */, - E12F98091CCFE21C00A7209D /* Memory.h */, - E12F980A1CCFE21C00A7209D /* micromouse.ino */, - E12F980B1CCFE21C00A7209D /* Motor.cpp */, - E12F980C1CCFE21C00A7209D /* Motor.h */, - E12F980D1CCFE21C00A7209D /* MouseBot.cpp */, - E12F980E1CCFE21C00A7209D /* MouseBot.h */, - E12F980F1CCFE21C00A7209D /* Node.cpp */, - E12F98101CCFE21C00A7209D /* Node.h */, - E12F98111CCFE21C00A7209D /* Path.cpp */, - E12F98121CCFE21C00A7209D /* Path.h */, - E12F98131CCFE21C00A7209D /* PIDController.cpp */, - E12F98141CCFE21C00A7209D /* PIDController.h */, - E12F98151CCFE21C00A7209D /* RobotIO.cpp */, - E12F98161CCFE21C00A7209D /* RobotIO.h */, - E12F98171CCFE21C00A7209D /* Timer.cpp */, - E12F98181CCFE21C00A7209D /* Timer.h */, - E12F98191CCFE21C00A7209D /* Vector.cpp */, - E12F981A1CCFE21C00A7209D /* Vector.h */, - E12F981B1CCFE21C00A7209D /* VirtualMaze.cpp */, - E12F981C1CCFE21C00A7209D /* VirtualMaze.h */, - ); - name = RES; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E1B489CB1CC87D9300643A24 /* micromouse-xcode */ = { - isa = PBXNativeTarget; - buildConfigurationList = E1B489D31CC87D9300643A24 /* Build configuration list for PBXNativeTarget "micromouse-xcode" */; - buildPhases = ( - E1B489C81CC87D9300643A24 /* Sources */, - E1B489C91CC87D9300643A24 /* Frameworks */, - E1B489CA1CC87D9300643A24 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "micromouse-xcode"; - productName = "micromouse-xcode"; - productReference = E1B489CC1CC87D9300643A24 /* micromouse-xcode */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E1B489C41CC87D9300643A24 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0730; - ORGANIZATIONNAME = "Erick Sanchez"; - TargetAttributes = { - E1B489CB1CC87D9300643A24 = { - CreatedOnToolsVersion = 7.3; - }; - }; - }; - buildConfigurationList = E1B489C71CC87D9300643A24 /* Build configuration list for PBXProject "micromouse-xcode" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = E1B489C31CC87D9300643A24; - productRefGroup = E1B489CD1CC87D9300643A24 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E1B489CB1CC87D9300643A24 /* micromouse-xcode */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E1B489C81CC87D9300643A24 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E12F98241CCFE21C00A7209D /* Node.cpp in Sources */, - E12F98211CCFE21C00A7209D /* Memory.cpp in Sources */, - E12F98281CCFE21C00A7209D /* Timer.cpp in Sources */, - E1B489D01CC87D9300643A24 /* main.cpp in Sources */, - E12F981E1CCFE21C00A7209D /* FlagMatrix.cpp in Sources */, - E12F98261CCFE21C00A7209D /* PIDController.cpp in Sources */, - E12F98251CCFE21C00A7209D /* Path.cpp in Sources */, - E12F98231CCFE21C00A7209D /* MouseBot.cpp in Sources */, - E12F98291CCFE21C00A7209D /* Vector.cpp in Sources */, - E12F981F1CCFE21C00A7209D /* IRSensor.cpp in Sources */, - E12F981D1CCFE21C00A7209D /* Controller.cpp in Sources */, - E12F982A1CCFE21C00A7209D /* VirtualMaze.cpp in Sources */, - E12F98201CCFE21C00A7209D /* Maze.cpp in Sources */, - E12F98271CCFE21C00A7209D /* RobotIO.cpp in Sources */, - E12F98221CCFE21C00A7209D /* Motor.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - E1B489D11CC87D9300643A24 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - E1B489D21CC87D9300643A24 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - }; - name = Release; - }; - E1B489D41CC87D9300643A24 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - E1B489D51CC87D9300643A24 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E1B489C71CC87D9300643A24 /* Build configuration list for PBXProject "micromouse-xcode" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E1B489D11CC87D9300643A24 /* Debug */, - E1B489D21CC87D9300643A24 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E1B489D31CC87D9300643A24 /* Build configuration list for PBXNativeTarget "micromouse-xcode" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E1B489D41CC87D9300643A24 /* Debug */, - E1B489D51CC87D9300643A24 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E1B489C41CC87D9300643A24 /* Project object */; -} diff --git a/micromouse-xcode/micromouse-xcode/main.cpp b/micromouse-xcode/micromouse-xcode/main.cpp deleted file mode 100644 index 54deb46..0000000 --- a/micromouse-xcode/micromouse-xcode/main.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "Logger.h" -const LogLevel LOG_LEVEL = DEBUG2; - - -#include -#include -#include //time -#include "Controller.h" - - - -using namespace std; - -volatile bool buttonFlag; - -int main( int argc , char** argv ) -{ - //seed the random function - srand( (unsigned int)time( NULL ) ); - - Micromouse::Controller routine; - - system( "pause" ); - - return 0; -} \ No newline at end of file From 8d96584f316620301441baa3db1f918660fbd942 Mon Sep 17 00:00:00 2001 From: Erick Date: Thu, 2 Jun 2016 13:02:44 -0700 Subject: [PATCH 10/12] Extracting Codes Codes are located at this [spreadsheet](https://docs.google.com/spreadsheets/d/1zIhQ-8UmOYflNnDYCz lLkUQ36gXbFe5Jb5eG3tSFJYs/edit?usp=sharing) --- micromouse/AssertionHandler.h | 1 + micromouse/IRSensor.cpp | 8 ++++---- micromouse/Maze.cpp | 4 ++-- micromouse/MouseBot.cpp | 4 ++-- micromouse/PIDController.cpp | 4 ++-- micromouse/Path.cpp | 7 +++---- micromouse/RobotIO.cpp | 4 ++-- micromouse/Vector.cpp | 10 +++++----- micromouse/VirtualMaze.cpp | 4 ++-- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/micromouse/AssertionHandler.h b/micromouse/AssertionHandler.h index b3c0f92..e7b31d8 100644 --- a/micromouse/AssertionHandler.h +++ b/micromouse/AssertionHandler.h @@ -10,6 +10,7 @@ #define AssertionHandler_h #include "Memory.h" +#include #ifdef __MK20DX256__ // Teensy Compile diff --git a/micromouse/IRSensor.cpp b/micromouse/IRSensor.cpp index 694e385..e137afa 100644 --- a/micromouse/IRSensor.cpp +++ b/micromouse/IRSensor.cpp @@ -1,7 +1,7 @@ #include "IRSensor.h" #include "Logger.h" #include "RobotIO.h" -#include +#include "AssertionHandler.h" #ifdef __MK20DX256__ // Teensy Compile #include "WProgram.h" @@ -33,12 +33,12 @@ namespace Micromouse { bool IRSensor::calibrate( int calibrationStart, int calibrationInterval ) { - assert(calibrationStart >= MIN_RANGE); - assert(calibrationInterval > 0); + assertion(calibrationStart >= MIN_RANGE, 1); + assertion(calibrationInterval > 0, 2); this->calibrationStart = calibrationStart; this->calibrationInterval = calibrationInterval; calibrationSize = ( MAX_RANGE - calibrationStart ) / calibrationInterval + 1; - assert(calibrationSize <= 17); + assertion(calibrationSize <= 17, 3); delete[] calibrationData; calibrationData = new int[calibrationSize]; diff --git a/micromouse/Maze.cpp b/micromouse/Maze.cpp index adc1603..1a5e7c9 100644 --- a/micromouse/Maze.cpp +++ b/micromouse/Maze.cpp @@ -2,7 +2,7 @@ #include #include #include "Maze.h" -#include +#include "AssertionHandler.h" namespace Micromouse { @@ -137,7 +137,7 @@ namespace Micromouse // adds a new node to the maze at the given position void Maze::addNode( PositionVector pos ) { - assert(isInsideMaze(pos)); + assertion(isInsideMaze(pos), 4); maze[pos.x()][pos.y()] = new Node(pos); } diff --git a/micromouse/MouseBot.cpp b/micromouse/MouseBot.cpp index a51f5d0..0712584 100644 --- a/micromouse/MouseBot.cpp +++ b/micromouse/MouseBot.cpp @@ -10,7 +10,7 @@ Author GitHub: joshuasrjc #include "MouseBot.h" #include "Logger.h" #include "ButtonFlag.h" - +#include "AssertionHandler.h" namespace Micromouse @@ -466,7 +466,7 @@ namespace Micromouse void MouseBot::setSpeed( int spd ) { speed = spd; - assert(speed > 0 && speed <= MAX_SPEED); + assertion(speed > 0 && speed <= MAX_SPEED, 5); } diff --git a/micromouse/PIDController.cpp b/micromouse/PIDController.cpp index d2232ee..80503b7 100644 --- a/micromouse/PIDController.cpp +++ b/micromouse/PIDController.cpp @@ -10,7 +10,7 @@ Author GitHub: joshuasrjc \*********************************/ #include "PIDController.h" -#include +#include "AssertionHandler.h" #include "Logger.h" #ifdef __MK20DX256__ // Teensy compile @@ -35,7 +35,7 @@ namespace Micromouse float PIDController::getCorrection(float currentError) { - assert(started); + assertion(started, 8); float deltaTime = getDeltaTime(); diff --git a/micromouse/Path.cpp b/micromouse/Path.cpp index 848dea5..7fe2125 100644 --- a/micromouse/Path.cpp +++ b/micromouse/Path.cpp @@ -1,6 +1,5 @@ #include "Path.h" -#include - +#include "AssertionHandler.h" @@ -26,7 +25,7 @@ namespace Micromouse DirectionVector Path::popStep() { - assert( !path.empty() ); + assertion(!path.empty(), 6); DirectionVector step = path.top(); path.pop(); @@ -38,7 +37,7 @@ namespace Micromouse DirectionVector Path::peekStep() { - assert( !path.empty() ); + assertion(!path.empty(), 7); return path.top(); } diff --git a/micromouse/RobotIO.cpp b/micromouse/RobotIO.cpp index 2900d1d..4eb739e 100644 --- a/micromouse/RobotIO.cpp +++ b/micromouse/RobotIO.cpp @@ -4,7 +4,7 @@ #include "Logger.h" #include "Timer.h" #include "ButtonFlag.h" - +#include "AssertionHandler.h" #ifdef __MK20DX256__ // Teensy Compile @@ -81,7 +81,7 @@ namespace Micromouse bool RobotIO::isWallinDirection( direction dir ) { // ensure valid data - assert( dir == W || dir == N || dir == E || dir == NW || dir == NE); + assertion(dir == W || dir == N || dir == E || dir == NW || dir == NE, 9); switch( dir ) { diff --git a/micromouse/Vector.cpp b/micromouse/Vector.cpp index b57116b..17bd4e9 100644 --- a/micromouse/Vector.cpp +++ b/micromouse/Vector.cpp @@ -1,5 +1,5 @@ #include "Vector.h" -#include +#include "AssertionHandler.h" namespace Micromouse { @@ -201,9 +201,9 @@ namespace Micromouse void DirectionVector::validateSelf() { - assert( _dir != NONE ); - assert( _mag >= 0 ); - - assert( _mag < NUM_NODES_W || _mag < NUM_NODES_H ); + assertion(_dir != NONE, 10); + assertion(_mag >= 0, 11); + assertion(_mag < NUM_NODES_W || _mag < NUM_NODES_H, 12); + } } diff --git a/micromouse/VirtualMaze.cpp b/micromouse/VirtualMaze.cpp index 9f11897..7654de6 100644 --- a/micromouse/VirtualMaze.cpp +++ b/micromouse/VirtualMaze.cpp @@ -6,7 +6,7 @@ Author GitHub: joshuasrjc \*********************************/ #include "VirtualMaze.h" -#include +#include "AssertionHandler.h" #ifdef __MK20DX256__ // Teensy Compile #include //random @@ -23,7 +23,7 @@ namespace Micromouse width(width), height(height) { - assert(width % 4 == 3 && height % 4 == 3); + assertion(width % 4 == 3 && height % 4 == 3, 13); } From ebb9dcec78e611557093001007224cedf8537271 Mon Sep 17 00:00:00 2001 From: Erick Date: Sun, 5 Jun 2016 21:24:17 -0700 Subject: [PATCH 11/12] log() implementation for AssertionHandler --- .../MicroMouse-2016.xcodeproj/project.pbxproj | 3 +++ micromouse/AssertionHandler.h | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/MicroMouse-2016/MicroMouse-2016.xcodeproj/project.pbxproj b/MicroMouse-2016/MicroMouse-2016.xcodeproj/project.pbxproj index 6b2eec9..ac7f52c 100644 --- a/MicroMouse-2016/MicroMouse-2016.xcodeproj/project.pbxproj +++ b/MicroMouse-2016/MicroMouse-2016.xcodeproj/project.pbxproj @@ -37,6 +37,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + E119488C1D052D4B00D5794C /* AssertionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AssertionHandler.h; path = ../../micromouse/AssertionHandler.h; sourceTree = ""; }; E1D9B6F61CD7CB2900F1C492 /* MicroMouse-2016 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "MicroMouse-2016"; sourceTree = BUILT_PRODUCTS_DIR; }; E1D9B7001CD7CB4800F1C492 /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Main.cpp; sourceTree = ""; }; E1D9B7031CD7CB7E00F1C492 /* ButtonFlag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonFlag.h; path = ../../micromouse/ButtonFlag.h; sourceTree = ""; }; @@ -113,6 +114,7 @@ isa = PBXGroup; children = ( E1D9B7031CD7CB7E00F1C492 /* ButtonFlag.h */, + E119488C1D052D4B00D5794C /* AssertionHandler.h */, E1D9B7041CD7CB7E00F1C492 /* callibration_temp */, E1D9B7051CD7CB7E00F1C492 /* Controller.cpp */, E1D9B7061CD7CB7E00F1C492 /* Controller.h */, @@ -339,6 +341,7 @@ E1D9B6FF1CD7CB2900F1C492 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/micromouse/AssertionHandler.h b/micromouse/AssertionHandler.h index e7b31d8..536f1e1 100644 --- a/micromouse/AssertionHandler.h +++ b/micromouse/AssertionHandler.h @@ -26,6 +26,15 @@ inline static void logError( int code ) { } +inline static void printErrorCodes() { + for (int error = 0; error <= 11; error += 1) { + int address = Micromouse::ERROR_MEMORY; + log(Micromouse::Memory::read((error * 4) +address)); + + } + +} + //Prints to concole using Logger(..) << code and metadata of the assertion #define assertion(condition,code) \ ( \ From 2e1c8ab04dcef0119fd837b3b809a3fe6507c072 Mon Sep 17 00:00:00 2001 From: Erick Date: Sun, 5 Jun 2016 22:23:44 -0700 Subject: [PATCH 12/12] fix : use of log( .. ) --- micromouse/AssertionHandler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/micromouse/AssertionHandler.h b/micromouse/AssertionHandler.h index 536f1e1..13543c1 100644 --- a/micromouse/AssertionHandler.h +++ b/micromouse/AssertionHandler.h @@ -9,6 +9,7 @@ #ifndef AssertionHandler_h #define AssertionHandler_h +#include "Logger.h" #include "Memory.h" #include @@ -29,7 +30,7 @@ inline static void logError( int code ) { inline static void printErrorCodes() { for (int error = 0; error <= 11; error += 1) { int address = Micromouse::ERROR_MEMORY; - log(Micromouse::Memory::read((error * 4) +address)); + log(INFO) << Micromouse::Memory::read((error * 4) +address); }