├── .gitignore
├── README.md
├── app
├── OpenCV
│ ├── .gradle
│ │ ├── 3.4.1
│ │ │ ├── file-changes
│ │ │ │ └── last-build.bin
│ │ │ ├── fileContent
│ │ │ │ ├── annotation-processors.bin
│ │ │ │ └── fileContent.lock
│ │ │ ├── javaCompile
│ │ │ │ ├── classAnalysis.bin
│ │ │ │ ├── jarAnalysis.bin
│ │ │ │ ├── javaCompile.lock
│ │ │ │ ├── taskHistory.bin
│ │ │ │ └── taskJars.bin
│ │ │ └── taskHistory
│ │ │ │ ├── fileHashes.bin
│ │ │ │ ├── fileSnapshots.bin
│ │ │ │ ├── jvmClassSignatures.bin
│ │ │ │ ├── taskHistory.bin
│ │ │ │ └── taskHistory.lock
│ │ └── buildOutputCleanup
│ │ │ ├── built.bin
│ │ │ ├── cache.properties
│ │ │ └── cache.properties.lock
│ ├── .idea
│ │ ├── libraries
│ │ │ ├── animated_vector_drawable_23_4_0.xml
│ │ │ ├── appcompat_v7_23_4_0.xml
│ │ │ ├── butterknife_7_0_1.xml
│ │ │ ├── design_23_4_0.xml
│ │ │ ├── hamcrest_core_1_3.xml
│ │ │ ├── junit_4_12.xml
│ │ │ ├── recyclerview_v7_23_4_0.xml
│ │ │ ├── rxandroid_1_1_0.xml
│ │ │ ├── rxjava_1_1_0.xml
│ │ │ ├── support_annotations_23_4_0.xml
│ │ │ ├── support_v4_23_4_0.xml
│ │ │ └── support_vector_drawable_23_4_0.xml
│ │ └── workspace.xml
│ ├── OpenCV.iml
│ └── openCVLibrary249
│ │ ├── build
│ │ ├── generated
│ │ │ └── source
│ │ │ │ ├── aidl
│ │ │ │ ├── debug
│ │ │ │ │ └── org
│ │ │ │ │ │ └── opencv
│ │ │ │ │ │ └── engine
│ │ │ │ │ │ └── OpenCVEngineInterface.java
│ │ │ │ └── release
│ │ │ │ │ └── org
│ │ │ │ │ └── opencv
│ │ │ │ │ └── engine
│ │ │ │ │ └── OpenCVEngineInterface.java
│ │ │ │ ├── buildConfig
│ │ │ │ ├── androidTest
│ │ │ │ │ └── debug
│ │ │ │ │ │ └── org
│ │ │ │ │ │ └── opencv
│ │ │ │ │ │ └── test
│ │ │ │ │ │ └── BuildConfig.java
│ │ │ │ ├── debug
│ │ │ │ │ └── org
│ │ │ │ │ │ └── opencv
│ │ │ │ │ │ └── BuildConfig.java
│ │ │ │ └── release
│ │ │ │ │ └── org
│ │ │ │ │ └── opencv
│ │ │ │ │ └── BuildConfig.java
│ │ │ │ └── r
│ │ │ │ ├── androidTest
│ │ │ │ └── debug
│ │ │ │ │ └── org
│ │ │ │ │ └── opencv
│ │ │ │ │ ├── R.java
│ │ │ │ │ └── test
│ │ │ │ │ └── R.java
│ │ │ │ ├── debug
│ │ │ │ └── org
│ │ │ │ │ └── opencv
│ │ │ │ │ └── R.java
│ │ │ │ └── release
│ │ │ │ └── org
│ │ │ │ └── opencv
│ │ │ │ └── R.java
│ │ ├── intermediates
│ │ │ ├── blame
│ │ │ │ └── res
│ │ │ │ │ └── androidTest
│ │ │ │ │ └── debug
│ │ │ │ │ └── multi
│ │ │ │ │ └── values.json
│ │ │ ├── bundles
│ │ │ │ ├── debug
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── R.txt
│ │ │ │ │ ├── classes.jar
│ │ │ │ │ └── res
│ │ │ │ │ │ └── values
│ │ │ │ │ │ └── values.xml
│ │ │ │ └── release
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── R.txt
│ │ │ │ │ ├── classes.jar
│ │ │ │ │ └── res
│ │ │ │ │ └── values
│ │ │ │ │ └── values.xml
│ │ │ ├── incremental-safeguard
│ │ │ │ ├── androidTest
│ │ │ │ │ └── debug
│ │ │ │ │ │ └── tag.txt
│ │ │ │ ├── debug
│ │ │ │ │ └── tag.txt
│ │ │ │ └── release
│ │ │ │ │ └── tag.txt
│ │ │ ├── incremental
│ │ │ │ ├── compileDebugAidl
│ │ │ │ │ └── dependency.store
│ │ │ │ ├── compileDebugAndroidTestAidl
│ │ │ │ │ └── dependency.store
│ │ │ │ ├── compileReleaseAidl
│ │ │ │ │ └── dependency.store
│ │ │ │ ├── mergeDebugAndroidTestResources
│ │ │ │ │ ├── compile-file-map.properties
│ │ │ │ │ ├── merged.dir
│ │ │ │ │ │ └── values
│ │ │ │ │ │ │ └── values.xml
│ │ │ │ │ └── merger.xml
│ │ │ │ ├── mergeDebugAssets
│ │ │ │ │ └── merger.xml
│ │ │ │ ├── mergeDebugJniLibFolders
│ │ │ │ │ └── merger.xml
│ │ │ │ ├── mergeDebugShaders
│ │ │ │ │ └── merger.xml
│ │ │ │ ├── mergeReleaseAssets
│ │ │ │ │ └── merger.xml
│ │ │ │ ├── mergeReleaseJniLibFolders
│ │ │ │ │ └── merger.xml
│ │ │ │ ├── mergeReleaseShaders
│ │ │ │ │ └── merger.xml
│ │ │ │ ├── packageDebugResources
│ │ │ │ │ ├── compile-file-map.properties
│ │ │ │ │ ├── merged.dir
│ │ │ │ │ │ └── values
│ │ │ │ │ │ │ └── values.xml
│ │ │ │ │ └── merger.xml
│ │ │ │ └── packageReleaseResources
│ │ │ │ │ ├── compile-file-map.properties
│ │ │ │ │ ├── merged.dir
│ │ │ │ │ └── values
│ │ │ │ │ │ └── values.xml
│ │ │ │ │ └── merger.xml
│ │ │ ├── manifest
│ │ │ │ └── androidTest
│ │ │ │ │ └── debug
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ ├── manifests
│ │ │ │ └── aapt
│ │ │ │ │ ├── debug
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ └── release
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ ├── res
│ │ │ │ └── merged
│ │ │ │ │ └── androidTest
│ │ │ │ │ └── debug
│ │ │ │ │ └── values
│ │ │ │ │ └── values.xml
│ │ │ └── symbols
│ │ │ │ └── androidTest
│ │ │ │ └── debug
│ │ │ │ └── R.txt
│ │ └── outputs
│ │ │ └── aar
│ │ │ ├── openCVLibrary249-debug.aar
│ │ │ └── openCVLibrary249-release.aar
│ │ └── openCVLibrary249.iml
└── RubikRobot
│ ├── .gitignore
│ ├── .idea
│ ├── compiler.xml
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ └── workspace.xml
│ ├── CHANGELOG.md
│ ├── RubikRobot.iml
│ ├── app-debug.apk
│ ├── app.iml
│ ├── app
│ ├── app.iml
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── dreamwalker
│ │ │ └── rubikrobot
│ │ │ ├── MainActivity.java
│ │ │ ├── bluetooth
│ │ │ ├── BluetoothChatService.java
│ │ │ └── DeviceListActivity.java
│ │ │ ├── camera
│ │ │ └── ColorRecognition.java
│ │ │ ├── solver
│ │ │ ├── CoordCube.java
│ │ │ ├── CubieCube.java
│ │ │ ├── RubikRobot.java
│ │ │ ├── Search.java
│ │ │ ├── Tools.java
│ │ │ └── Util.java
│ │ │ ├── ui
│ │ │ ├── AboutActivity.java
│ │ │ ├── CubePreview.java
│ │ │ ├── GuideViewPagerAdapter.java
│ │ │ ├── WelcomeActivity.java
│ │ │ └── WelcomeGuideActivity.java
│ │ │ └── util
│ │ │ └── SharedPreferencesUtil.java
│ │ └── res
│ │ ├── drawable-hdpi
│ │ ├── app_icon.png
│ │ ├── button_shape.xml
│ │ ├── camfront.png
│ │ ├── cube.jpg
│ │ ├── dot_selector.xml
│ │ ├── google_logo.png
│ │ ├── guide_img1.jpg
│ │ ├── guide_img2.jpg
│ │ ├── guide_img3.jpg
│ │ ├── guide_img4.jpg
│ │ ├── ic_action_back.png
│ │ ├── ic_action_camera.png
│ │ ├── ic_action_cancel.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_bluetooth.png
│ │ ├── ic_info.png
│ │ ├── ic_preview.png
│ │ ├── ic_seting.png
│ │ ├── logo.png
│ │ ├── logo2.png
│ │ ├── logo3.png
│ │ ├── logo5.png
│ │ ├── point1.png
│ │ ├── point2.png
│ │ ├── takepictures.png
│ │ ├── welcomimg1.jpg
│ │ ├── welcomimg10.jpg
│ │ ├── welcomimg11.jpg
│ │ ├── welcomimg12.jpg
│ │ ├── welcomimg2.jpg
│ │ ├── welcomimg3.jpg
│ │ ├── welcomimg4.jpg
│ │ ├── welcomimg5.jpg
│ │ ├── welcomimg6.jpg
│ │ ├── welcomimg7.jpg
│ │ ├── welcomimg8.jpg
│ │ ├── welcomimg9.jpg
│ │ └── welcomimg_bg.xml
│ │ ├── drawable-ldpi
│ │ ├── app_icon.png
│ │ ├── camfront.png
│ │ ├── cube.jpg
│ │ ├── ic_action_back.png
│ │ ├── ic_action_camera.png
│ │ ├── ic_action_cancel.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_bluetooth.png
│ │ ├── ic_info.png
│ │ ├── ic_preview.png
│ │ └── ic_seting.png
│ │ ├── drawable-mdpi
│ │ ├── app_icon.png
│ │ ├── camfront.png
│ │ ├── cube.jpg
│ │ ├── ic_action_back.png
│ │ ├── ic_action_camera.png
│ │ ├── ic_action_cancel.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_bluetooth.png
│ │ ├── ic_info.png
│ │ ├── ic_preview.png
│ │ └── ic_seting.png
│ │ ├── drawable-xhdpi
│ │ ├── app_icon.png
│ │ ├── camfront.png
│ │ ├── cube.jpg
│ │ ├── google_logo.png
│ │ ├── ic_action_back.png
│ │ ├── ic_action_camera.png
│ │ ├── ic_action_cancel.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_bluetooth.png
│ │ ├── ic_info.png
│ │ ├── ic_preview.png
│ │ └── ic_seting.png
│ │ ├── drawable-xxhdpi
│ │ ├── app_icon.png
│ │ ├── camfront.png
│ │ ├── cube.jpg
│ │ ├── ic_action_back.png
│ │ ├── ic_action_camera.png
│ │ ├── ic_action_cancel.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_bluetooth.png
│ │ ├── ic_info.png
│ │ ├── ic_preview.png
│ │ └── ic_seting.png
│ │ ├── layout
│ │ ├── activity_about.xml
│ │ ├── activity_guide.xml
│ │ ├── activity_main.xml
│ │ ├── activity_welcome.xml
│ │ ├── cube_preview.xml
│ │ ├── custom_title.xml
│ │ ├── device_list.xml
│ │ ├── device_name.xml
│ │ ├── guide_view1.xml
│ │ ├── guide_view2.xml
│ │ ├── guide_view3.xml
│ │ ├── main.xml
│ │ ├── manage.xml
│ │ └── message.xml
│ │ ├── menu
│ │ ├── activity_main.xml
│ │ ├── bluetooth_menu.xml
│ │ └── option_menu.xml
│ │ └── values
│ │ ├── color.xml
│ │ └── strings.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── mcu
└── Cube Robot
│ ├── CORE
│ ├── core_cm3.c
│ ├── core_cm3.h
│ ├── startup_stm32f10x_hd.s
│ └── startup_stm32f10x_md.s
│ ├── HARDWARE
│ ├── EXTI
│ │ ├── exti.c
│ │ └── exti.h
│ ├── INSTRUCTION
│ │ ├── instruction.c
│ │ └── instruction.h
│ ├── KEY
│ │ ├── key.c
│ │ └── key.h
│ ├── LED
│ │ ├── led.c
│ │ └── led.h
│ ├── MOTER
│ │ ├── motor.c
│ │ └── motor.h
│ ├── MOVEMENT
│ │ ├── movement.c
│ │ └── movement.h
│ └── TIMER
│ │ ├── timer.c
│ │ └── timer.h
│ ├── OBJ
│ └── Cube Robot.hex
│ ├── Read Me.txt
│ ├── STM32F10x_FWLib
│ ├── inc
│ │ ├── misc.h
│ │ ├── stm32f10x_adc.h
│ │ ├── stm32f10x_bkp.h
│ │ ├── stm32f10x_can.h
│ │ ├── stm32f10x_cec.h
│ │ ├── stm32f10x_crc.h
│ │ ├── stm32f10x_dac.h
│ │ ├── stm32f10x_dbgmcu.h
│ │ ├── stm32f10x_dma.h
│ │ ├── stm32f10x_exti.h
│ │ ├── stm32f10x_flash.h
│ │ ├── stm32f10x_fsmc.h
│ │ ├── stm32f10x_gpio.h
│ │ ├── stm32f10x_i2c.h
│ │ ├── stm32f10x_iwdg.h
│ │ ├── stm32f10x_pwr.h
│ │ ├── stm32f10x_rcc.h
│ │ ├── stm32f10x_rtc.h
│ │ ├── stm32f10x_sdio.h
│ │ ├── stm32f10x_spi.h
│ │ ├── stm32f10x_tim.h
│ │ ├── stm32f10x_usart.h
│ │ └── stm32f10x_wwdg.h
│ └── src
│ │ ├── misc.c
│ │ ├── stm32f10x_adc.c
│ │ ├── stm32f10x_bkp.c
│ │ ├── stm32f10x_can.c
│ │ ├── stm32f10x_cec.c
│ │ ├── stm32f10x_crc.c
│ │ ├── stm32f10x_dac.c
│ │ ├── stm32f10x_dbgmcu.c
│ │ ├── stm32f10x_dma.c
│ │ ├── stm32f10x_exti.c
│ │ ├── stm32f10x_flash.c
│ │ ├── stm32f10x_fsmc.c
│ │ ├── stm32f10x_gpio.c
│ │ ├── stm32f10x_i2c.c
│ │ ├── stm32f10x_iwdg.c
│ │ ├── stm32f10x_pwr.c
│ │ ├── stm32f10x_rcc.c
│ │ ├── stm32f10x_rtc.c
│ │ ├── stm32f10x_sdio.c
│ │ ├── stm32f10x_spi.c
│ │ ├── stm32f10x_tim.c
│ │ ├── stm32f10x_usart.c
│ │ └── stm32f10x_wwdg.c
│ ├── SYSTEM
│ ├── delay
│ │ ├── delay.c
│ │ └── delay.h
│ ├── sys
│ │ ├── sys.c
│ │ └── sys.h
│ └── usart
│ │ ├── usart.c
│ │ └── usart.h
│ ├── USER
│ ├── JLink Regs CM3.txt
│ ├── JLinkSettings.ini
│ ├── RTE
│ │ └── RTE_Components.h
│ ├── Rube Robot.uvguix.Administrator
│ ├── Rube Robot.uvguix.fenxi
│ ├── Rube Robot.uvopt
│ ├── Rube Robot.uvoptx
│ ├── Rube Robot.uvproj.saved_uv4
│ ├── Rube Robot.uvprojx
│ ├── USART.Opt
│ ├── main.c
│ ├── stm32f10x.h
│ ├── stm32f10x_conf.h
│ ├── stm32f10x_it.c
│ ├── stm32f10x_it.h
│ ├── system_stm32f10x.c
│ └── system_stm32f10x.h
│ └── keilkilll.bat
├── picture
└── 20160306.jpg
└── reference
└── Kociemba.pdf
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | #*.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | app/RubikRobot/bin/
13 | app/RubikRobot/gen/
14 |
15 | # Gradle files
16 | app/RubikRobot/.gradle/
17 | app/RubikRobot/build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
25 | # Log Files
26 | *.log
27 |
28 | # Android Studio Navigation editor temp files
29 | app/RubikRobot/.navigation/
30 | app/RubikRobot/.idea/
31 |
32 | # Android Studio captures folder
33 | app/RubikRobot/captures/
34 | app/OpenCV/app/
35 |
36 | app/OpenCV/build/
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## RubikRobot 魔方机器人
2 | 本项目利用安卓app配合stm32单片机驱动舵机对任意正确状态下三阶魔方进行自动复原。值得注意的是,对于app的编写,我们借鉴了[DigDream](https://github.com/DigDream/RubiksCubeRobot)的实现方式,Android Studio工程见app文件夹。
3 |
4 | ### 预览
5 |
6 |
7 |
8 | ### 工程组织结构
9 | 文件夹名 | 作用 |
10 | ---------|----------|
11 | app | android客户端
12 | mcu | 舵机控制、蓝牙通信
13 | picture | 图片
14 | reference | Two-Phase-Algorithm 魔方解算算法
15 |
16 | ### 项目流程
17 | 手机(android 4.4 及以上)运行APP (实现色块的识别,解魔方算法) --》蓝牙向stm32系列单片机开发板通信--》驱动舵机--》旋转魔方--》复原完成.
18 |
19 | ### 视频
20 | [解魔方机器人](http://player.youku.com/embed/XMTQ5MTU5NzM4OA==)
21 |
22 | ### 开发者
23 | © 2016 追梦者团队 刘兵(**队长**),王恒,张正轩
24 |
25 | ### 致谢
26 | 在此,我们特别感谢[DigDream](https://github.com/DigDream/RubiksCubeRobot)、[原子哥](http://www.openedv.com/)和其他一些致力于开放源代码的朋友们。
27 |
28 | ### License
29 | 采用[知识共享 署名-非商业性使用-相同方式共享 4.0 国际 许可](http://creativecommons.org/licenses/by-nc-sa/4.0/)协议进行许可。
30 |
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/file-changes/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/fileContent/annotation-processors.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/fileContent/annotation-processors.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/javaCompile/taskJars.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/javaCompile/taskJars.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/taskHistory/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/taskHistory/fileHashes.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/taskHistory/fileSnapshots.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/taskHistory/fileSnapshots.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/taskHistory/jvmClassSignatures.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/taskHistory/jvmClassSignatures.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/taskHistory/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/taskHistory/taskHistory.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/3.4.1/taskHistory/taskHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/3.4.1/taskHistory/taskHistory.lock
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/buildOutputCleanup/built.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/.gradle/buildOutputCleanup/built.bin
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Sun Apr 16 17:48:03 CST 2017
2 | gradle.version=3.4.1
3 |
--------------------------------------------------------------------------------
/app/OpenCV/.gradle/buildOutputCleanup/cache.properties.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/animated_vector_drawable_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/appcompat_v7_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/butterknife_7_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/design_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/hamcrest_core_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/junit_4_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/recyclerview_v7_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/rxandroid_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/rxjava_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/support_annotations_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/support_v4_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/OpenCV/.idea/libraries/support_vector_drawable_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/OpenCV/OpenCV.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/generated/source/buildConfig/androidTest/debug/org/opencv/test/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatically generated file. DO NOT MODIFY
3 | */
4 | package org.opencv.test;
5 |
6 | public final class BuildConfig {
7 | public static final boolean DEBUG = Boolean.parseBoolean("true");
8 | public static final String APPLICATION_ID = "org.opencv.test";
9 | public static final String BUILD_TYPE = "debug";
10 | public static final String FLAVOR = "";
11 | public static final int VERSION_CODE = -1;
12 | public static final String VERSION_NAME = "";
13 | }
14 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/generated/source/buildConfig/debug/org/opencv/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatically generated file. DO NOT MODIFY
3 | */
4 | package org.opencv;
5 |
6 | public final class BuildConfig {
7 | public static final boolean DEBUG = Boolean.parseBoolean("true");
8 | public static final String APPLICATION_ID = "org.opencv";
9 | public static final String BUILD_TYPE = "debug";
10 | public static final String FLAVOR = "";
11 | public static final int VERSION_CODE = 2490;
12 | public static final String VERSION_NAME = "2.4.9";
13 | }
14 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/generated/source/buildConfig/release/org/opencv/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatically generated file. DO NOT MODIFY
3 | */
4 | package org.opencv;
5 |
6 | public final class BuildConfig {
7 | public static final boolean DEBUG = false;
8 | public static final String APPLICATION_ID = "org.opencv";
9 | public static final String BUILD_TYPE = "release";
10 | public static final String FLAVOR = "";
11 | public static final int VERSION_CODE = 2490;
12 | public static final String VERSION_NAME = "2.4.9";
13 | }
14 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/generated/source/r/androidTest/debug/org/opencv/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 | package org.opencv;
8 |
9 | public final class R {
10 | public static final class attr {
11 | public static final int camera_id = 0x7f010001;
12 | public static final int show_fps = 0x7f010000;
13 | }
14 | public static final class id {
15 | public static final int any = 0x7f020000;
16 | public static final int back = 0x7f020001;
17 | public static final int front = 0x7f020002;
18 | }
19 | public static final class styleable {
20 | public static final int[] CameraBridgeViewBase = { 0x7f010000, 0x7f010001 };
21 | public static final int CameraBridgeViewBase_camera_id = 1;
22 | public static final int CameraBridgeViewBase_show_fps = 0;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/generated/source/r/androidTest/debug/org/opencv/test/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package org.opencv.test;
9 |
10 | public final class R {
11 | public static final class attr {
12 | /**
May be an integer value, such as "100
".
13 |
This may also be a reference to a resource (in the form
14 | "@[package :]type :name
") or
15 | theme attribute (in the form
16 | "?[package :][type :]name
")
17 | containing a value of this type.
18 |
May be one of the following constant values.
19 |
20 |
21 |
22 |
23 | Constant Value Description
24 | any
-1
25 | back
99
26 | front
98
27 |
28 | */
29 | public static final int camera_id=0x7f010001;
30 | /** Must be a boolean value, either "true
" or "false
".
31 |
This may also be a reference to a resource (in the form
32 | "@[package :]type :name
") or
33 | theme attribute (in the form
34 | "?[package :][type :]name
")
35 | containing a value of this type.
36 | */
37 | public static final int show_fps=0x7f010000;
38 | }
39 | public static final class id {
40 | public static final int any=0x7f020000;
41 | public static final int back=0x7f020001;
42 | public static final int front=0x7f020002;
43 | }
44 | public static final class styleable {
45 | /** Attributes that can be used with a CameraBridgeViewBase.
46 |
Includes the following attributes:
47 |
48 |
49 |
50 | Attribute Description
51 | {@link #CameraBridgeViewBase_camera_id org.opencv.test:camera_id}
52 | {@link #CameraBridgeViewBase_show_fps org.opencv.test:show_fps}
53 |
54 | @see #CameraBridgeViewBase_camera_id
55 | @see #CameraBridgeViewBase_show_fps
56 | */
57 | public static final int[] CameraBridgeViewBase = {
58 | 0x7f010000, 0x7f010001
59 | };
60 | /**
61 | This symbol is the offset where the {@link org.opencv.test.R.attr#camera_id}
62 | attribute's value can be found in the {@link #CameraBridgeViewBase} array.
63 |
64 |
65 |
May be an integer value, such as "100
".
66 |
This may also be a reference to a resource (in the form
67 | "@[package :]type :name
") or
68 | theme attribute (in the form
69 | "?[package :][type :]name
")
70 | containing a value of this type.
71 |
May be one of the following constant values.
72 |
73 |
74 |
75 |
76 | Constant Value Description
77 | any
-1
78 | back
99
79 | front
98
80 |
81 | @attr name org.opencv.test:camera_id
82 | */
83 | public static final int CameraBridgeViewBase_camera_id = 1;
84 | /**
85 | This symbol is the offset where the {@link org.opencv.test.R.attr#show_fps}
86 | attribute's value can be found in the {@link #CameraBridgeViewBase} array.
87 |
88 |
89 |
Must be a boolean value, either "true
" or "false
".
90 |
This may also be a reference to a resource (in the form
91 | "@[package :]type :name
") or
92 | theme attribute (in the form
93 | "?[package :][type :]name
")
94 | containing a value of this type.
95 | @attr name org.opencv.test:show_fps
96 | */
97 | public static final int CameraBridgeViewBase_show_fps = 0;
98 | };
99 | }
100 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/generated/source/r/debug/org/opencv/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package org.opencv;
9 |
10 | public final class R {
11 | public static final class attr {
12 | /**
May be an integer value, such as "100
".
13 |
This may also be a reference to a resource (in the form
14 | "@[package :]type :name
") or
15 | theme attribute (in the form
16 | "?[package :][type :]name
")
17 | containing a value of this type.
18 |
May be one of the following constant values.
19 |
20 |
21 |
22 |
23 | Constant Value Description
24 | any
-1
25 | back
99
26 | front
98
27 |
28 | */
29 | public static int camera_id=0x7f010001;
30 | /** Must be a boolean value, either "true
" or "false
".
31 |
This may also be a reference to a resource (in the form
32 | "@[package :]type :name
") or
33 | theme attribute (in the form
34 | "?[package :][type :]name
")
35 | containing a value of this type.
36 | */
37 | public static int show_fps=0x7f010000;
38 | }
39 | public static final class id {
40 | public static int any=0x7f020000;
41 | public static int back=0x7f020001;
42 | public static int front=0x7f020002;
43 | }
44 | public static final class styleable {
45 | /** Attributes that can be used with a CameraBridgeViewBase.
46 |
Includes the following attributes:
47 |
48 |
49 |
50 | Attribute Description
51 | {@link #CameraBridgeViewBase_camera_id org.opencv:camera_id}
52 | {@link #CameraBridgeViewBase_show_fps org.opencv:show_fps}
53 |
54 | @see #CameraBridgeViewBase_camera_id
55 | @see #CameraBridgeViewBase_show_fps
56 | */
57 | public static final int[] CameraBridgeViewBase = {
58 | 0x7f010000, 0x7f010001
59 | };
60 | /**
61 | This symbol is the offset where the {@link org.opencv.R.attr#camera_id}
62 | attribute's value can be found in the {@link #CameraBridgeViewBase} array.
63 |
64 |
65 |
May be an integer value, such as "100
".
66 |
This may also be a reference to a resource (in the form
67 | "@[package :]type :name
") or
68 | theme attribute (in the form
69 | "?[package :][type :]name
")
70 | containing a value of this type.
71 |
May be one of the following constant values.
72 |
73 |
74 |
75 |
76 | Constant Value Description
77 | any
-1
78 | back
99
79 | front
98
80 |
81 | @attr name org.opencv:camera_id
82 | */
83 | public static int CameraBridgeViewBase_camera_id = 1;
84 | /**
85 | This symbol is the offset where the {@link org.opencv.R.attr#show_fps}
86 | attribute's value can be found in the {@link #CameraBridgeViewBase} array.
87 |
88 |
89 |
Must be a boolean value, either "true
" or "false
".
90 |
This may also be a reference to a resource (in the form
91 | "@[package :]type :name
") or
92 | theme attribute (in the form
93 | "?[package :][type :]name
")
94 | containing a value of this type.
95 | @attr name org.opencv:show_fps
96 | */
97 | public static int CameraBridgeViewBase_show_fps = 0;
98 | };
99 | }
100 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/generated/source/r/release/org/opencv/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package org.opencv;
9 |
10 | public final class R {
11 | public static final class attr {
12 | /**
May be an integer value, such as "100
".
13 |
This may also be a reference to a resource (in the form
14 | "@[package :]type :name
") or
15 | theme attribute (in the form
16 | "?[package :][type :]name
")
17 | containing a value of this type.
18 |
May be one of the following constant values.
19 |
20 |
21 |
22 |
23 | Constant Value Description
24 | any
-1
25 | back
99
26 | front
98
27 |
28 | */
29 | public static int camera_id=0x7f010001;
30 | /** Must be a boolean value, either "true
" or "false
".
31 |
This may also be a reference to a resource (in the form
32 | "@[package :]type :name
") or
33 | theme attribute (in the form
34 | "?[package :][type :]name
")
35 | containing a value of this type.
36 | */
37 | public static int show_fps=0x7f010000;
38 | }
39 | public static final class id {
40 | public static int any=0x7f020000;
41 | public static int back=0x7f020001;
42 | public static int front=0x7f020002;
43 | }
44 | public static final class styleable {
45 | /** Attributes that can be used with a CameraBridgeViewBase.
46 |
Includes the following attributes:
47 |
48 |
49 |
50 | Attribute Description
51 | {@link #CameraBridgeViewBase_camera_id org.opencv:camera_id}
52 | {@link #CameraBridgeViewBase_show_fps org.opencv:show_fps}
53 |
54 | @see #CameraBridgeViewBase_camera_id
55 | @see #CameraBridgeViewBase_show_fps
56 | */
57 | public static final int[] CameraBridgeViewBase = {
58 | 0x7f010000, 0x7f010001
59 | };
60 | /**
61 | This symbol is the offset where the {@link org.opencv.R.attr#camera_id}
62 | attribute's value can be found in the {@link #CameraBridgeViewBase} array.
63 |
64 |
65 |
May be an integer value, such as "100
".
66 |
This may also be a reference to a resource (in the form
67 | "@[package :]type :name
") or
68 | theme attribute (in the form
69 | "?[package :][type :]name
")
70 | containing a value of this type.
71 |
May be one of the following constant values.
72 |
73 |
74 |
75 |
76 | Constant Value Description
77 | any
-1
78 | back
99
79 | front
98
80 |
81 | @attr name org.opencv:camera_id
82 | */
83 | public static int CameraBridgeViewBase_camera_id = 1;
84 | /**
85 | This symbol is the offset where the {@link org.opencv.R.attr#show_fps}
86 | attribute's value can be found in the {@link #CameraBridgeViewBase} array.
87 |
88 |
89 |
Must be a boolean value, either "true
" or "false
".
90 |
This may also be a reference to a resource (in the form
91 | "@[package :]type :name
") or
92 | theme attribute (in the form
93 | "?[package :][type :]name
")
94 | containing a value of this type.
95 | @attr name org.opencv:show_fps
96 | */
97 | public static int CameraBridgeViewBase_show_fps = 0;
98 | };
99 | }
100 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/blame/res/androidTest/debug/multi/values.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "outputFile": "D:\\AndroidStudioProjects\\RubikRobot\\app\\OpenCV\\openCVLibrary249\\build\\intermediates\\incremental\\mergeDebugAndroidTestResources\\merged.dir\\values\\values.xml",
4 | "map": []
5 | }
6 | ]
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/debug/R.txt:
--------------------------------------------------------------------------------
1 | int attr camera_id 0x7f010001
2 | int attr show_fps 0x7f010000
3 | int id any 0x7f020000
4 | int id back 0x7f020001
5 | int id front 0x7f020002
6 | int[] styleable CameraBridgeViewBase { 0x7f010000, 0x7f010001 }
7 | int styleable CameraBridgeViewBase_camera_id 1
8 | int styleable CameraBridgeViewBase_show_fps 0
9 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/debug/classes.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/openCVLibrary249/build/intermediates/bundles/debug/classes.jar
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/debug/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/release/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/release/R.txt:
--------------------------------------------------------------------------------
1 | int attr camera_id 0x7f010001
2 | int attr show_fps 0x7f010000
3 | int id any 0x7f020000
4 | int id back 0x7f020001
5 | int id front 0x7f020002
6 | int[] styleable CameraBridgeViewBase { 0x7f010000, 0x7f010001 }
7 | int styleable CameraBridgeViewBase_camera_id 1
8 | int styleable CameraBridgeViewBase_show_fps 0
9 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/release/classes.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/openCVLibrary249/build/intermediates/bundles/release/classes.jar
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/bundles/release/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental-safeguard/androidTest/debug/tag.txt:
--------------------------------------------------------------------------------
1 | incremental task execution
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental-safeguard/debug/tag.txt:
--------------------------------------------------------------------------------
1 | incremental task execution
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental-safeguard/release/tag.txt:
--------------------------------------------------------------------------------
1 | incremental task execution
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/compileDebugAidl/dependency.store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/openCVLibrary249/build/intermediates/incremental/compileDebugAidl/dependency.store
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/compileDebugAndroidTestAidl/dependency.store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/compileReleaseAidl/dependency.store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/openCVLibrary249/build/intermediates/incremental/compileReleaseAidl/dependency.store
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeDebugAndroidTestResources/compile-file-map.properties:
--------------------------------------------------------------------------------
1 | #Mon May 01 19:29:34 CST 2017
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeDebugAndroidTestResources/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeDebugAssets/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeDebugShaders/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeReleaseAssets/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeReleaseJniLibFolders/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/mergeReleaseShaders/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/packageDebugResources/compile-file-map.properties:
--------------------------------------------------------------------------------
1 | #Mon May 01 19:29:30 CST 2017
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/packageDebugResources/merged.dir/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/packageDebugResources/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties:
--------------------------------------------------------------------------------
1 | #Mon May 01 19:29:03 CST 2017
2 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/packageReleaseResources/merged.dir/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/incremental/packageReleaseResources/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/manifest/androidTest/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/manifests/aapt/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/manifests/aapt/release/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/res/merged/androidTest/debug/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/intermediates/symbols/androidTest/debug/R.txt:
--------------------------------------------------------------------------------
1 | int attr camera_id 0x7f010001
2 | int attr show_fps 0x7f010000
3 | int id any 0x7f020000
4 | int id back 0x7f020001
5 | int id front 0x7f020002
6 | int[] styleable CameraBridgeViewBase { 0x7f010000, 0x7f010001 }
7 | int styleable CameraBridgeViewBase_camera_id 1
8 | int styleable CameraBridgeViewBase_show_fps 0
9 |
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/outputs/aar/openCVLibrary249-debug.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/openCVLibrary249/build/outputs/aar/openCVLibrary249-debug.aar
--------------------------------------------------------------------------------
/app/OpenCV/openCVLibrary249/build/outputs/aar/openCVLibrary249-release.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/OpenCV/openCVLibrary249/build/outputs/aar/openCVLibrary249-release.aar
--------------------------------------------------------------------------------
/app/RubikRobot/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | #*.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 |
19 | # Local configuration file (sdk path, etc)
20 | local.properties
21 |
22 | # Proguard folder generated by Eclipse
23 | proguard/
24 |
25 | # Log Files
26 | *.log
27 |
28 | # Android Studio Navigation editor temp files
29 | .navigation/
30 |
31 | # Android Studio captures folder
32 | captures/
--------------------------------------------------------------------------------
/app/RubikRobot/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/RubikRobot/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/RubikRobot/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/RubikRobot/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/RubikRobot/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.8
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/RubikRobot/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/RubikRobot/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/RubikRobot/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 更新日志
2 |
3 |
4 | ## 1.0.2 - 2017-03-11
5 | ### 更新
6 | - 修复app从armpc430板卡移植到手机,无法识别手机外部存储卡的问题
7 | - 修复拍照环节,预览画面和真实画面旋转90°的问题
8 | - 添加向视频预览画面中增加手机和硬件设备标定对齐点
9 | - 添加app安卓引导界面和启动界面
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/RubikRobot/RubikRobot.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/RubikRobot/app-debug.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app-debug.apk
--------------------------------------------------------------------------------
/app/RubikRobot/app.iml:
--------------------------------------------------------------------------------
1 | <<<<<<< HEAD
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | =======
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | >>>>>>> master
40 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | android {
3 | compileSdkVersion 23
4 | buildToolsVersion '23.0.3'
5 | defaultConfig {
6 | applicationId 'com.dreamwalker.rubikrobot'
7 | versionName '1.0'
8 | minSdkVersion 19
9 | targetSdkVersion 19
10 | versionCode 1
11 | }
12 | productFlavors {
13 | }
14 | }
15 |
16 | dependencies {
17 | compile fileTree(dir: 'libs', include: ['*.jar'])
18 | testCompile 'junit:junit:4.12'
19 | compile 'com.jakewharton:butterknife:7.0.1'
20 | compile 'io.reactivex:rxandroid:1.1.0'
21 | compile 'io.reactivex:rxjava:1.1.0'
22 | compile 'com.android.support:appcompat-v7:23.2.0'
23 | compile 'com.android.support:design:23.4.0'
24 | }
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
26 |
27 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
42 |
43 |
44 |
45 |
48 |
49 |
54 |
55 |
59 |
60 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/java/com/dreamwalker/rubikrobot/solver/RubikRobot.java:
--------------------------------------------------------------------------------
1 | package com.dreamwalker.rubikrobot.solver;
2 |
3 | /**
4 | * Created by Administrator on 2016/2/26.
5 | */
6 | public class RubikRobot {
7 |
8 | public static Search search = new Search();
9 |
10 | public static String changeChars(String solution) {
11 | String solution2 = solution.replace(" ", "");
12 | StringBuffer chars = new StringBuffer(solution2);
13 | chars.insert(0, "#");
14 | chars.insert(chars.length(), "!");
15 | return (chars.toString());
16 | }
17 |
18 | public static String getSolution(String chars) {
19 | String rubik_solution = search.solution(chars, 21, 100, 0, 0);
20 | return changeChars(rubik_solution);
21 | }
22 |
23 |
24 | // public static String getSolution(String cubeDefinitionString) {
25 | //
26 | // String originSolution=search.solution(cubeDefinitionString,21, 10000, 0, 0);
27 | //
28 | // StringBuffer solution = new StringBuffer(originSolution.replace(" ", ""));
29 | // solution.insert(0,"#");//帧起始标志位 #
30 | // solution.insert(originSolution.length(),"!");//帧结束标志位 !
31 | // return (solution.toString());
32 | // }
33 | }
34 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/java/com/dreamwalker/rubikrobot/ui/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package com.dreamwalker.rubikrobot.ui;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.view.Menu;
6 | import android.view.MenuItem;
7 |
8 | import com.dreamwalker.rubikrobot.R;
9 |
10 |
11 | /**
12 | * Created by fenxi on 2016/2/23.
13 | */
14 |
15 | public class AboutActivity extends Activity {
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_about);
21 |
22 | }
23 |
24 | @Override
25 | protected void onStart() {
26 | super.onStart();
27 | }
28 |
29 | @Override
30 | protected void onResume() {
31 | super.onResume();
32 | }
33 |
34 | @Override
35 | protected void onPause() {
36 | super.onPause();
37 | }
38 |
39 | @Override
40 | protected void onStop() {
41 | super.onStop();
42 | }
43 |
44 | @Override
45 | protected void onDestroy() {
46 | super.onDestroy();
47 | }
48 |
49 | @Override
50 | public void onContentChanged() {
51 | super.onContentChanged();
52 | }
53 |
54 |
55 | @Override
56 | public boolean onCreateOptionsMenu(Menu menu) {
57 | // Inflate the menu; this adds items to the action bar if it is present.
58 | //getMenuInflater().inflate(R.menu.menu_setting, menu);
59 | return true;
60 | }
61 |
62 | @Override
63 | public boolean onOptionsItemSelected(MenuItem item) {
64 | // Handle action bar item clicks here. The action bar will
65 | // automatically handle clicks on the Home/Up button, so long
66 | // as you specify a parent activity in AndroidManifest.xml.
67 | // int id = item.getItemId();
68 |
69 | //noinspection SimplifiableIfStatement
70 | /*if (id == R.id.action_settings) {
71 | return true;
72 | }*/
73 |
74 | return super.onOptionsItemSelected(item);
75 | }
76 |
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/java/com/dreamwalker/rubikrobot/ui/GuideViewPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.dreamwalker.rubikrobot.ui;
2 |
3 | import android.support.v4.view.PagerAdapter;
4 | import android.support.v4.view.ViewPager;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 |
8 | import java.util.List;
9 |
10 | /**
11 | * Created by xialo on 2016/7/25.
12 | */
13 | public class GuideViewPagerAdapter extends PagerAdapter {
14 | private List views;
15 |
16 | public GuideViewPagerAdapter(List views) {
17 | super();
18 | this.views = views;
19 | }
20 |
21 | @Override
22 | public int getCount() {
23 | if (views != null) {
24 | return views.size();
25 | }
26 | return 0;
27 | }
28 |
29 | @Override
30 | public void destroyItem(ViewGroup container, int position, Object object) {
31 | ((ViewPager) container).removeView(views.get(position));
32 | }
33 |
34 | @Override
35 | public boolean isViewFromObject(View view, Object object) {
36 | return view == ((View) object);
37 | }
38 |
39 | @Override
40 | public Object instantiateItem(ViewGroup container, int position) {
41 | ((ViewPager) container).addView(views.get(position), 0);
42 | return views.get(position);
43 | }
44 | }
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/java/com/dreamwalker/rubikrobot/ui/WelcomeActivity.java:
--------------------------------------------------------------------------------
1 | package com.dreamwalker.rubikrobot.ui;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.AnimatorSet;
6 | import android.animation.ObjectAnimator;
7 | import android.app.Activity;
8 | import android.content.Intent;
9 | import android.os.Bundle;
10 | import android.os.SystemClock;
11 | import android.view.KeyEvent;
12 | import android.widget.ImageView;
13 |
14 | import com.dreamwalker.rubikrobot.MainActivity;
15 | import com.dreamwalker.rubikrobot.R;
16 | import com.dreamwalker.rubikrobot.util.SharedPreferencesUtil;
17 |
18 | import java.util.Random;
19 | import java.util.concurrent.TimeUnit;
20 |
21 | import butterknife.Bind;
22 | import butterknife.ButterKnife;
23 | import rx.Observable;
24 | import rx.android.schedulers.AndroidSchedulers;
25 | import rx.functions.Action1;
26 |
27 | public class WelcomeActivity extends Activity {
28 |
29 | private static final int ANIM_TIME = 2000;
30 | private static final float SCALE_END = 1.15F;
31 | private static final int[] Imgs = {
32 | R.drawable.welcomimg1, R.drawable.welcomimg2,
33 | R.drawable.welcomimg3, R.drawable.welcomimg4,
34 | R.drawable.welcomimg5, R.drawable.welcomimg6,
35 | R.drawable.welcomimg7, R.drawable.welcomimg8,
36 | R.drawable.welcomimg9, R.drawable.welcomimg10,
37 | R.drawable.welcomimg11, R.drawable.welcomimg12};
38 | @Bind(R.id.iv_entry)
39 | ImageView mIVEntry;
40 |
41 | @Override
42 | protected void onCreate(Bundle savedInstanceState) {
43 | super.onCreate(savedInstanceState);
44 | // 判断是否是第一次开启应用
45 | boolean isFirstOpen = SharedPreferencesUtil.getBoolean(this, SharedPreferencesUtil.FIRST_OPEN, true);
46 | // 如果是第一次启动,则先进入功能引导页
47 | if (isFirstOpen) {
48 | Intent intent = new Intent(this, WelcomeGuideActivity.class);
49 | startActivity(intent);
50 | finish();
51 | return;
52 | }
53 |
54 | // 如果不是第一次启动app,则正常显示启动屏
55 | setContentView(R.layout.activity_welcome);
56 | ButterKnife.bind(this);
57 | startMainActivity();
58 | }
59 |
60 | private void startMainActivity() {
61 | Random random = new Random(SystemClock.elapsedRealtime());//SystemClock.elapsedRealtime() 从开机到现在的毫秒数(手机睡眠(sleep)的时间也包括在内)
62 | mIVEntry.setImageResource(Imgs[random.nextInt(Imgs.length)]);
63 |
64 | Observable.timer(1000, TimeUnit.MILLISECONDS)
65 | .observeOn(AndroidSchedulers.mainThread())
66 | .subscribe(new Action1() {
67 |
68 | @Override
69 | public void call(Long aLong) {
70 | startAnim();
71 | }
72 | });
73 | }
74 |
75 | private void startAnim() {
76 |
77 | ObjectAnimator animatorX = ObjectAnimator.ofFloat(mIVEntry, "scaleX", 1f, SCALE_END);
78 | ObjectAnimator animatorY = ObjectAnimator.ofFloat(mIVEntry, "scaleY", 1f, SCALE_END);
79 |
80 | AnimatorSet set = new AnimatorSet();
81 | set.setDuration(ANIM_TIME).play(animatorX).with(animatorY);
82 | set.start();
83 |
84 | set.addListener(new AnimatorListenerAdapter() {
85 |
86 | @Override
87 | public void onAnimationEnd(Animator animation) {
88 |
89 | startActivity(new Intent(WelcomeActivity.this, MainActivity.class));
90 | WelcomeActivity.this.finish();
91 | }
92 | });
93 | }
94 |
95 | /**
96 | * 屏蔽物理返回按钮
97 | *
98 | * @param keyCode
99 | * @param event
100 | * @return
101 | */
102 | @Override
103 | public boolean onKeyDown(int keyCode, KeyEvent event) {
104 | if (keyCode == KeyEvent.KEYCODE_BACK) {
105 | return true;
106 | }
107 | return super.onKeyDown(keyCode, event);
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/java/com/dreamwalker/rubikrobot/ui/WelcomeGuideActivity.java:
--------------------------------------------------------------------------------
1 | package com.dreamwalker.rubikrobot.ui;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.support.v4.view.ViewPager;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.ImageView;
11 | import android.widget.LinearLayout;
12 |
13 | import com.dreamwalker.rubikrobot.R;
14 | import com.dreamwalker.rubikrobot.util.SharedPreferencesUtil;
15 |
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 | /**
20 | * Created by xialo on 2016/7/25.
21 | */
22 | public class WelcomeGuideActivity extends Activity implements View.OnClickListener {
23 | // 引导页图片资源
24 | private static final int[] pics = {R.layout.guide_view1,
25 | R.layout.guide_view2, R.layout.guide_view3};
26 | private ViewPager vp;
27 | private GuideViewPagerAdapter adapter;
28 | private List views;
29 | private Button startBtn;
30 | // 底部小点图片
31 | private ImageView[] dots;
32 |
33 | // 记录当前选中位置
34 | private int currentIndex;
35 |
36 | @Override
37 | protected void onCreate(Bundle savedInstanceState) {
38 | super.onCreate(savedInstanceState);
39 | setContentView(R.layout.activity_guide);
40 |
41 | views = new ArrayList();
42 |
43 | // 初始化引导页视图列表
44 | for (int i = 0; i < pics.length; i++) {
45 | View view = LayoutInflater.from(this).inflate(pics[i], null);
46 |
47 | if (i == pics.length - 1) {
48 | startBtn = (Button) view.findViewById(R.id.btn_enter);
49 | startBtn.setTag("enter");
50 | startBtn.setOnClickListener(this);
51 | }
52 |
53 | views.add(view);
54 |
55 | }
56 |
57 | vp = (ViewPager) findViewById(R.id.vp_guide);
58 | adapter = new GuideViewPagerAdapter(views);
59 | vp.setAdapter(adapter);
60 | vp.addOnPageChangeListener(new PageChangeListener());
61 |
62 | initDots();
63 |
64 | }
65 |
66 | @Override
67 | protected void onResume() {
68 | super.onResume();
69 | }
70 |
71 | @Override
72 | protected void onPause() {
73 | super.onPause();
74 | // 如果切换到后台,就设置下次不进入功能引导页
75 | SharedPreferencesUtil.putBoolean(WelcomeGuideActivity.this, SharedPreferencesUtil.FIRST_OPEN, false);
76 | finish();
77 | }
78 |
79 | @Override
80 | protected void onStop() {
81 | super.onStop();
82 | }
83 |
84 | @Override
85 | protected void onDestroy() {
86 | super.onDestroy();
87 | }
88 |
89 | private void initDots() {
90 | LinearLayout ll = (LinearLayout) findViewById(R.id.ll);
91 | dots = new ImageView[pics.length];
92 |
93 | // 循环取得小点图片
94 | for (int i = 0; i < pics.length; i++) {
95 | // 得到一个LinearLayout下面的每一个子元素
96 | dots[i] = (ImageView) ll.getChildAt(i);
97 | dots[i].setEnabled(false);// 都设为灰色
98 | dots[i].setOnClickListener(this);
99 | dots[i].setTag(i);// 设置位置tag,方便取出与当前位置对应
100 | }
101 |
102 | currentIndex = 0;
103 | dots[currentIndex].setEnabled(true); // 设置为白色,即选中状态
104 |
105 | }
106 |
107 | /**
108 | * 设置当前view
109 | *
110 | * @param position
111 | */
112 | private void setCurView(int position) {
113 | if (position < 0 || position >= pics.length) {
114 | return;
115 | }
116 | vp.setCurrentItem(position);
117 | }
118 |
119 | /**
120 | * 设置当前指示点
121 | *
122 | * @param position
123 | */
124 | private void setCurDot(int position) {
125 | if (position < 0 || position > pics.length || currentIndex == position) {
126 | return;
127 | }
128 | dots[position].setEnabled(true);
129 | dots[currentIndex].setEnabled(false);
130 | currentIndex = position;
131 | }
132 |
133 | @Override
134 | public void onClick(View v) {
135 | if (v.getTag().equals("enter")) {
136 | enterMainActivity();
137 | return;
138 | }
139 |
140 | int position = (Integer) v.getTag();
141 | setCurView(position);
142 | setCurDot(position);
143 | }
144 |
145 |
146 | private void enterMainActivity() {
147 | Intent intent = new Intent(WelcomeGuideActivity.this,
148 | WelcomeActivity.class);
149 | startActivity(intent);
150 | SharedPreferencesUtil.putBoolean(WelcomeGuideActivity.this, SharedPreferencesUtil.FIRST_OPEN, false);
151 | finish();
152 | }
153 |
154 | private class PageChangeListener implements ViewPager.OnPageChangeListener {
155 | @Override
156 | public void onPageScrollStateChanged(int position) {
157 |
158 | }
159 |
160 | @Override
161 | public void onPageScrolled(int position, float arg1, int arg2) {
162 |
163 | }
164 |
165 | @Override
166 | public void onPageSelected(int position) {
167 | // 设置底部小点选中状态
168 | setCurDot(position);
169 | }
170 |
171 | }
172 | }
173 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/java/com/dreamwalker/rubikrobot/util/SharedPreferencesUtil.java:
--------------------------------------------------------------------------------
1 | package com.dreamwalker.rubikrobot.util;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | /**
7 | * Created by xialo on 2016/7/25.
8 | */
9 | public class SharedPreferencesUtil {
10 |
11 | public static final String FIRST_OPEN = "first_open";
12 | private static final String spFileName = "welcomePage";
13 |
14 | public static Boolean getBoolean(Context context, String strKey,
15 | Boolean strDefault) {//strDefault boolean: Value to return if this preference does not exist.
16 | SharedPreferences setPreferences = context.getSharedPreferences(
17 | spFileName, Context.MODE_PRIVATE);
18 | Boolean result = setPreferences.getBoolean(strKey, strDefault);
19 | return result;
20 | }
21 |
22 | public static void putBoolean(Context context, String strKey,
23 | Boolean strData) {
24 | SharedPreferences activityPreferences = context.getSharedPreferences(
25 | spFileName, Context.MODE_PRIVATE);
26 | SharedPreferences.Editor editor = activityPreferences.edit();
27 | editor.putBoolean(strKey, strData);
28 | editor.commit();
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/app_icon.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/button_shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/camfront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/camfront.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/cube.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/cube.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/dot_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/google_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/google_logo.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img1.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img2.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img3.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/guide_img4.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_back.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_cancel.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_action_forward.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_bluetooth.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_info.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_preview.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_seting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/ic_seting.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/logo2.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/logo3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/logo3.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/logo5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/logo5.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/point1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/point1.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/point2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/point2.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/takepictures.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/takepictures.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg1.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg10.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg11.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg12.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg2.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg3.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg4.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg5.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg6.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg7.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg8.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg9.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-hdpi/welcomimg_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/app_icon.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/camfront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/camfront.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/cube.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/cube.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_back.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_camera.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_cancel.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_action_forward.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_bluetooth.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_info.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_preview.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_seting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-ldpi/ic_seting.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/app_icon.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/camfront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/camfront.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/cube.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/cube.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_back.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_cancel.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_action_forward.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_bluetooth.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_info.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_preview.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_seting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-mdpi/ic_seting.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/app_icon.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/camfront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/camfront.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/cube.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/cube.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/google_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/google_logo.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_back.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_cancel.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_action_forward.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_bluetooth.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_info.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_preview.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_seting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xhdpi/ic_seting.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/app_icon.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/camfront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/camfront.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/cube.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/cube.jpg
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_back.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_camera.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_cancel.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_action_forward.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_bluetooth.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_info.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_preview.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_seting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/app/src/main/res/drawable-xxhdpi/ic_seting.png
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
20 |
21 |
30 |
31 |
39 |
40 |
49 |
50 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/activity_guide.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
14 |
15 |
16 |
17 |
18 |
26 |
27 |
34 |
35 |
44 |
45 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
18 |
19 |
22 |
23 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/activity_welcome.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
17 |
26 |
27 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/custom_title.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
30 |
39 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/device_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
23 |
24 |
32 |
33 |
39 |
40 |
45 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/device_name.xml:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/guide_view1.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/guide_view2.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/guide_view3.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
23 |
24 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/manage.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/layout/message.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/menu/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
8 |
9 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/menu/bluetooth_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/menu/option_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/values/color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #FF0000
5 | #33B5E5
6 | #99CC00
7 | #FFFFFF
8 | #FFFF00
9 | #FFA500
10 | #ffcccccc
11 |
12 | #dd000000
13 |
--------------------------------------------------------------------------------
/app/RubikRobot/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 魔方机器人
3 | 立即体验
4 |
5 |
6 | 设置
7 | 蓝牙设备
8 | 魔方预览
9 | 关于我们
10 |
11 |
12 | 发送
13 | 停止
14 | 成功
15 |
16 | 当前未连接到任何设备
17 | 蓝牙服务不可用
18 | 正在连接中...
19 | 连接到:
20 | 未连接
21 |
22 |
23 |
24 | 扫描设备...
25 | 选择要连接的设备
26 | 没有配对设备
27 | 未发现可连接的设备
28 | 已配对设备
29 | 其它可连接设备
30 | 扫描设备
31 | 跳转
32 |
33 |
34 | 本软件配合单片机控制器驱动舵机进行任意正确状态下三阶魔方的自动复原工作。软件开发期间,我们对DigDream先生github上开源作品进行仔细的研读和使用。
35 | \n\n在此,我们特别感谢DigDream和其他一些致力于开放源代码的朋友们。
36 | ©2016 追梦者
37 | 在知识共享 署名-相同方式共享 4.0协议之条款下提供
38 |
39 |
40 |
41 | 连接设备
42 | 断开连接
43 |
44 |
45 | 未找到摄像头硬件
46 | 点击屏幕任意位置进行拍照
47 |
48 |
49 | - There are not exactly nine facelets of each color!
50 | - Not all 12 edges exist exactly once!
51 | - Flip error: One edge has to be flipped!
52 | - Not all 8 corners exist exactly once!
53 | - Twist error: One corner has to be twisted!
54 | - Parity error: Two corners or two edges have to be exchanged!
55 | - No solution exists for the given maximum move number!
56 | - Timeout, no solution found within given maximum time!
57 |
58 |
59 | This cube is already solved!
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/RubikRobot/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:2.2.3'
8 | }
9 | }
10 |
11 | allprojects {
12 | repositories {
13 | jcenter()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/RubikRobot/gradle.properties:
--------------------------------------------------------------------------------
1 | ## Project-wide Gradle settings.
2 | #
3 | # For more details on how to configure your build environment visit
4 | # http://www.gradle.org/docs/current/userguide/build_environment.html
5 | #
6 | # Specifies the JVM arguments used for the daemon process.
7 | # The setting is particularly useful for tweaking memory settings.
8 | # Default value: -Xmx1024m -XX:MaxPermSize=256m
9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10 | #
11 | # When configured, Gradle will run in incubating parallel mode.
12 | # This option should only be used with decoupled projects. More details, visit
13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14 | # org.gradle.parallel=true
15 | #Mon Feb 27 09:01:46 CST 2017
16 | systemProp.http.proxyHost=127.0.0.1
17 | systemProp.http.proxyPort=1080
18 |
--------------------------------------------------------------------------------
/app/RubikRobot/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/app/RubikRobot/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/RubikRobot/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Feb 22 23:27:25 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/RubikRobot/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/RubikRobot/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/EXTI/exti.c:
--------------------------------------------------------------------------------
1 | #include "stm32f10x.h"
2 | #include "exti.h"
3 | #include "key.h"
4 | #include "led.h"
5 | #include "delay.h"
6 | #include "movement.h"
7 | #include "usart.h"
8 | #include "motor.h"
9 |
10 | u8 exti_flag=0;
11 | u8 movement_tag='Q';
12 |
13 | /*外部中断2初始化*/
14 | void Exti_Init(void)
15 | {
16 | EXTI_InitTypeDef EXTI_InitStructure;
17 | KEY_Init(); /*引脚GPIO初始化*/
18 |
19 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,ENABLE); /*使能复用功能时钟*/
20 |
21 | GPIO_EXTILineConfig(GPIO_PortSourceGPIOE,GPIO_PinSource2); /*打开外部中断*/
22 | EXTI_InitStructure.EXTI_Line=EXTI_Line2;
23 | EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
24 | EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; /*下降沿触发*/
25 | EXTI_InitStructure.EXTI_LineCmd = ENABLE;
26 | EXTI_Init(&EXTI_InitStructure);
27 |
28 | GPIO_EXTILineConfig(GPIO_PortSourceGPIOE,GPIO_PinSource3);
29 | EXTI_InitStructure.EXTI_Line=EXTI_Line3;
30 | EXTI_Init(&EXTI_InitStructure);
31 |
32 | GPIO_EXTILineConfig(GPIO_PortSourceGPIOE,GPIO_PinSource4);
33 | EXTI_InitStructure.EXTI_Line=EXTI_Line4;
34 | EXTI_Init(&EXTI_InitStructure);
35 |
36 | Ex_NVIC_Config(); /*外部中断优先级设置*/
37 |
38 | }
39 |
40 | /*外部中断优先级设置*/
41 | void Ex_NVIC_Config(void)
42 | {
43 | NVIC_InitTypeDef NVIC_InitStructure;
44 | NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQn;
45 | NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; /*抢占优先级2*/
46 | NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; /*子优先级2*/
47 | NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; /*使能外部中断通道*/
48 | NVIC_Init(&NVIC_InitStructure);
49 |
50 | NVIC_InitStructure.NVIC_IRQChannel = EXTI3_IRQn;
51 | NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; /*抢占优先级2*/
52 | NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; /*子优先级2*/
53 | NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; /*使能外部中断通道*/
54 | NVIC_Init(&NVIC_InitStructure);
55 |
56 | NVIC_InitStructure.NVIC_IRQChannel = EXTI4_IRQn;
57 | NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; /*抢占优先级2*/
58 | NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; /*子优先级2*/
59 | NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; /*使能外部中断通道*/
60 | NVIC_Init(&NVIC_InitStructure);
61 |
62 | }
63 |
64 |
65 |
66 |
67 | /*外部中断2中断服务程序
68 | *转到第一个需要拍照的面*/
69 | void EXTI2_IRQHandler(void)
70 | {
71 | delay_ms(10);
72 |
73 | if(KEY2==0)
74 | {
75 | LED0=!LED0;
76 | PicArray_ToBufferArray(firpic_position,3);
77 | motor_speed=250;
78 | change();
79 | TIM_Cmd(TIM3, ENABLE); /*打开TIM3*/
80 | movement_tag='Z';
81 | }
82 |
83 | EXTI_ClearITPendingBit(EXTI_Line2); /*清除LINE2上的中断标志位,经过测试发现,把这行代码放在if后面代码执行比较稳定*/
84 |
85 | }
86 |
87 |
88 | /*外部中断3中断服务程序
89 | *回到初始转动魔方的位置*/
90 | void EXTI4_IRQHandler(void)
91 | {
92 | delay_ms(10);
93 |
94 | if(KEY0==0)
95 | {
96 | LED1=!LED1;
97 | Init_MotorMovement();
98 | motor_speed=250;
99 | change();
100 | TIM_Cmd(TIM3, ENABLE);
101 | movement_tag='Y';
102 | }
103 | EXTI_ClearITPendingBit(EXTI_Line4); /*清除LINE4上的中断标志位,经过测试发现,把这行代码放在if后面代码执行比较稳定*/
104 |
105 | }
106 |
107 |
108 | /*外部中断3中断服务程序
109 | *舵机闭合*/
110 | void EXTI3_IRQHandler(void)
111 | {
112 | delay_ms(10);
113 |
114 | if(KEY1==0)
115 | {
116 | PicArray_ToBufferArray(firpic_position,1);
117 | motor_speed=500;
118 | change();
119 | TIM_Cmd(TIM3, ENABLE); /*打开TIM3*/
120 |
121 | }
122 | EXTI_ClearITPendingBit(EXTI_Line3); /*清除LINE3上的中断标志位,经过测试发现,把这行代码放在if后面代码执行比较稳定*/
123 |
124 | }
125 |
126 |
127 |
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/EXTI/exti.h:
--------------------------------------------------------------------------------
1 | #ifndef __EXTI__H___
2 | #define __EXTI__H___
3 |
4 | #include "stm32f10x.h"
5 |
6 | extern u8 exti_flag;
7 | extern u8 movement_tag;
8 |
9 | void Exti_Init(void);
10 | void Ex_NVIC_Config(void);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/INSTRUCTION/instruction.h:
--------------------------------------------------------------------------------
1 | #ifndef ___INSTRUCTION___H___
2 | #define ___INSTRUCTION___H___
3 |
4 | #include "stm32f10x.h"
5 |
6 | extern u16 solvecube_data[500][8];/*执行最终解算的数组*/
7 | extern u16 lines_num;
8 |
9 | void Initial_Data(u16 (*array)[8],u16 start_line,u16 end_line);
10 | u16 Analy_UsartString(void);
11 | u16 Ana_Double(u8 char1,u8 char2,u8 char3,u8 char4);
12 | u16 Get_Movement(u8 char1,u8 char2,u8 char3,u8 char4);
13 |
14 | u8 Ana_Double2(u8 char1,u8 char2);
15 | u8 Instruction_movement(u8 movement_instruction,u16 startline_num);
16 | u8 Get_Movement1_1(u8 char1,u8 char2,u8 char3);
17 | u8 Get_Movement1_2(u8 char1,u8 char2);
18 | u8 Get_Movement2_1(u8 char1,u8 char3);
19 | u8 Get_Movement2_2(u8 char1,u8 char3,u8 char4);
20 | u8 Get_Movement3_1(u8 char1,u8 char3);
21 | u8 Get_Movement3_2(u8 char1,u8 char3,u8 char4);
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/KEY/key.c:
--------------------------------------------------------------------------------
1 | #include "key.h"
2 | #include "sys.h"
3 | #include "delay.h"
4 |
5 |
6 | /*按键初始化函数*/
7 | void KEY_Init(void)
8 | {
9 | GPIO_InitTypeDef GPIO_InitStructure;
10 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE,ENABLE);
11 |
12 | GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4;/*Pin_4用来初始化舵机的位置,Pin_2用来把舵机转到拍照的第一个位置*/
13 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; /*设置成上拉输入*/
14 | GPIO_Init(GPIOE, &GPIO_InitStructure);
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/KEY/key.h:
--------------------------------------------------------------------------------
1 | #ifndef __KEY_H
2 | #define __KEY_H
3 | #include "sys.h"
4 |
5 | #define KEY0 GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_4)/*读取按键0*/
6 | #define KEY1 GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_3)/*读取按键1*/
7 | #define KEY2 GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_2)/*读取按键2*/
8 |
9 | void KEY_Init(void);
10 | #endif
11 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/LED/led.c:
--------------------------------------------------------------------------------
1 | #include "led.h"
2 |
3 |
4 | void LED_Init(void)
5 | {
6 | GPIO_InitTypeDef GPIO_InitStructure;
7 |
8 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOE, ENABLE); /*使能PB,PE端口时钟*/
9 |
10 | GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
11 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; /*推挽输出*/
12 | GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; /*IO口速度为50MHz*/
13 |
14 | GPIO_Init(GPIOB, &GPIO_InitStructure); /*根据设定参数初始化GPIOB.5*/
15 | GPIO_SetBits(GPIOB,GPIO_Pin_5); /*PB.5 输出高*/
16 |
17 | GPIO_Init(GPIOE, &GPIO_InitStructure); /*根据设定参数初始化GPIOE.5*/
18 | GPIO_SetBits(GPIOE,GPIO_Pin_5); /*PE.5 输出高*/
19 |
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/LED/led.h:
--------------------------------------------------------------------------------
1 | #ifndef __LED_H
2 | #define __LED_H
3 | #include "sys.h"
4 |
5 | #define LED0 PBout(5)
6 | #define LED1 PEout(5)
7 |
8 | void LED_Init(void);
9 | #endif
10 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/MOTER/motor.c:
--------------------------------------------------------------------------------
1 | /* 文件名:motor.c
2 | *文件描述:主要存放舵机数据线引脚GPIO的初始化和舵机速度控制插补算法
3 | *备 注:change函数n为速度值,经过实际测试,发现当n为50或者更小时,动作会出现错乱
4 | * 因为舵机转动有一定的机械滞后性,转动需要一定的时间,所以n值不能太小,测试
5 | * 中发现当n值为500或者1000时,舵机转动良好
6 | */
7 | #include "stm32f10x.h"
8 | #include "motor.h"
9 | #include "sys.h"
10 | #include "instruction.h"
11 | #include "movement.h"
12 | #include "usart.h"
13 | #include "exti.h"
14 | #include "timer.h"
15 |
16 | int point_now=-1; /*正在执行的数组*/
17 | u8 point_aim=0; /*正在执行数组的下一行数组*/
18 | u16 n=300; /*设定的插补次数*/
19 | u16 motor_speed=300;
20 | u16 m; /*当前的插补次数*/
21 | double dp;
22 | double dp0[8]; /*插补增量*/
23 | u16 pwm[8]={1490,1455,1530,1480,1950,1890,1910,830};
24 |
25 |
26 |
27 | u16 pos[500][8];
28 |
29 |
30 | /*
31 | *函 数 名:change()
32 | *功能描述:初位置末尾置更替
33 | * 有效的数据是插补增量,和插补次数,知道这两个量,和当前初位置即可
34 | *输 入:无
35 | *输 出:无
36 | *调 用:被 vpwm()调用
37 | *备 注:要实现匀角速度,须在每一次进入此函数时对8个舵机赋予不同的插补量,
38 | */
39 | void change(void)
40 | {
41 | u8 s; /*舵机的个数*/
42 | n=motor_speed; /*速度值*/
43 | m=0;
44 |
45 | if(point_aim==lines_num) /*(pos[][]的行数-1)*/
46 | {
47 |
48 | TIM_Cmd(TIM3, DISABLE); /*关掉TIMx*/
49 | point_aim=0;
50 | point_now=-1;
51 | switch(movement_tag)
52 | {
53 | case 'Z':
54 | {
55 | USART_SendChar('1');
56 | //TIM4_Set_Time(60000); /*定时1S*/
57 | TIM_Cmd(TIM4, ENABLE);/*开启定时器*/
58 |
59 | }break;
60 |
61 | case 'A':
62 | {
63 | USART_SendChar('2');
64 | //TIM4_Set_Time(60000); /*定时1S*/
65 | TIM_Cmd(TIM4, ENABLE);/*开启定时器*/
66 | }break;
67 |
68 | case 'B':
69 | {
70 | USART_SendChar('3');
71 | // TIM4_Set_Time(60000); /*定时1S*/
72 | TIM_Cmd(TIM4, ENABLE);/*开启定时器*/
73 | }break;
74 |
75 | case 'C':
76 | {
77 | USART_SendChar('4');
78 | // TIM4_Set_Time(60000); /*定时1S*/
79 | TIM_Cmd(TIM4, ENABLE);/*开启定时器*/
80 | }break;
81 |
82 | case 'D':
83 | {
84 | USART_SendChar('5');
85 | // TIM4_Set_Time(60000); /*定时1S*/
86 | TIM_Cmd(TIM4, ENABLE);/*开启定时器*/
87 | }break;
88 |
89 | case 'E':
90 | {
91 | USART_SendChar('6');
92 | // TIM4_Set_Time(60000); /*定时1S*/
93 | TIM_Cmd(TIM4, ENABLE);/*开启定时器*/
94 | }break;
95 |
96 | default:
97 | {
98 |
99 | }break;
100 |
101 | }
102 | }
103 |
104 | else
105 | {
106 | point_aim++;
107 | point_now++;
108 | for(s=0;s<8;s++) /*计算新一行数组的插补增量*/
109 | {
110 |
111 | if(pos[point_aim][s]>pos[point_now][s])
112 | {
113 | dp=pos[point_aim][s]-pos[point_now][s];
114 | dp0[s]=dp/n;
115 | }
116 | if(pos[point_aim][s]<=pos[point_now][s])
117 | {
118 | dp=pos[point_now][s]-pos[point_aim][s];
119 | dp0[s]=dp/n;
120 | dp0[s]=-dp0[s];
121 | }
122 | }
123 |
124 | }
125 |
126 | }
127 |
128 |
129 | /*
130 | *函 数 名:pwm[]数组更新函数
131 | *功能描述:数据插补,插补时间间隔为20ms/16,由Timer1控制,使舵机平滑实现速度控制
132 | * 另一个功能是执行完一行后去更新下一行数据,即调用change()
133 | *输 入:无
134 | *输 出:无
135 | *调 用:被main.c调用
136 | *备 注:
137 | */
138 | void vpwm(void)
139 | {
140 | u8 j=0;
141 | u8 how=0;
142 | static u8 flag_how;
143 | static u8 flag_Tover;
144 |
145 | m++; /*用来累加插补过的次数*/
146 | if(m==n) /*n是本行作业要插补的总次的执行数*/
147 | flag_Tover=1; /*一行数据时间已经完成*/
148 |
149 | for(j=0;j<8;j++)
150 | {
151 | if(((pwm[j]-pos[point_aim][j])<5)||((pos[point_aim][j]-pwm[j])<5))
152 | { /*检测靠近终点位置*/
153 | how++; /*是,则累加一个*/
154 | pwm[j]=pos[point_aim][j];/*并且直接过度到终点位置*/
155 | }
156 | else /*不靠近终点,继续插补*/
157 | pwm[j]=pos[point_now][j]+m*dp0[j];
158 |
159 | }
160 | if(how==8)
161 | flag_how=1; /*舵机都到达终点*/
162 | how=0;
163 |
164 | if((flag_Tover==1)&&(flag_how==1))
165 | { /*从插补次数,和脉宽宽度两方面都到达终点,本作业行完成*/
166 | flag_Tover=0;
167 | flag_how=0;
168 | change(); /*行完成标志置*/
169 | }
170 | return;
171 |
172 | }
173 |
174 |
175 | /* 功能描述:初始化和信号线连接的GPIO引脚
176 | * 备 注:PA.0--------PA.7
177 | */
178 | void MotorPin_Init(void)
179 | {
180 | GPIO_InitTypeDef GPIO_InitStructure;
181 |
182 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE); /*使能PinA端口时钟*/
183 |
184 | GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7; //PA.0---PA.7 端口配置
185 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; /*推挽输出*/
186 | GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; /*IO口速度为50MHz*/
187 |
188 | GPIO_Init(GPIOA, &GPIO_InitStructure); /*根据设定参数初始化GPIOA*/
189 | GPIO_ResetBits(GPIOA,GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7); //PB.5 输出高
190 |
191 |
192 | }
193 |
194 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/MOTER/motor.h:
--------------------------------------------------------------------------------
1 | #ifndef ___MOTOR___H____
2 | #define ___MOTOR___H____
3 |
4 |
5 | #include "stm32f10x.h"
6 |
7 | #define PWM1 PAout(0)// PB5
8 | #define PWM2 PAout(1)// PE5
9 | #define PWM3 PAout(2)// PB5
10 | #define PWM4 PAout(3)// PE5
11 | #define PWM5 PAout(4)// PB5
12 | #define PWM6 PAout(5)// PE5
13 | #define PWM7 PAout(6)// PB5
14 | #define PWM8 PAout(7)// PE5
15 |
16 | extern u16 pwm[8];
17 | extern u16 pos[500][8];
18 | extern u16 motor_speed;
19 |
20 | void change(void);
21 | void vpwm(void);
22 | void MotorPin_Init(void);
23 |
24 |
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/MOVEMENT/movement.h:
--------------------------------------------------------------------------------
1 | #ifndef ____MOVEMENT____H____
2 | #define ____MOVEMENT____H____
3 |
4 | #include "stm32f10x.h"
5 |
6 | extern u16 initial_position[8];
7 |
8 | extern u16 firpic_position[4][8];
9 | extern u16 secpic_position[1][8];
10 | extern u16 thirpic_position[4][8];
11 | extern u16 fourpic_position[1][8];
12 | extern u16 fifpic_position[4][8];
13 | extern u16 sixpic_position[1][8];
14 | extern u16 retuinit_position[4][8];
15 |
16 |
17 | extern u16 u_clockwise90[16][8];/*上层顺时针90度*/
18 | extern u16 d_clockwise90[16][8];/*下层顺时针90度*/
19 | extern u16 r_clockwise90[4][8];/*右层顺时针90度*/
20 | extern u16 l_clockwise90[4][8];/*左层顺时针90度*/
21 | extern u16 f_clockwise90[4][8];/*前层顺时针90度*/
22 | extern u16 b_clockwise90[4][8];/*后层顺时针90度*/
23 |
24 | extern u16 u_anticlockwise90[16][8];/*上层逆时针90度*/
25 | extern u16 d_anticlockwise90[16][8];/*下层逆时针90度*/
26 | extern u16 r_anticlockwise90[4][8];/*右层逆时针90度*/
27 | extern u16 l_anticlockwise90[4][8];/*左层逆时针90度*/
28 | extern u16 f_anticlockwise90[4][8];/*前层逆时针90度*/
29 | extern u16 b_anticlockwise90[4][8];/*后层逆时针90度*/
30 |
31 | extern u16 u_clock180[20][8]; /*上层180度*/
32 | extern u16 d_clock180[20][8]; /*下层180度*/
33 |
34 |
35 | extern u16 double_movement1[4][8];
36 | extern u16 double_movement2[4][8];
37 | extern u16 double_movement3[8][8];
38 | extern u16 double_movement4[4][8];
39 | extern u16 double_movement5[4][8];
40 | extern u16 double_movement6[8][8];
41 | extern u16 double_movement7[8][8];
42 | extern u16 double_movement8[8][8];
43 | extern u16 double_movement9[8][8];
44 |
45 | extern u16 double_movement10[4][8];
46 | extern u16 double_movement11[4][8];
47 | extern u16 double_movement12[8][8];
48 | extern u16 double_movement13[4][8];
49 | extern u16 double_movement14[4][8];
50 | extern u16 double_movement15[8][8];
51 | extern u16 double_movement16[8][8];
52 | extern u16 double_movement17[8][8];
53 | extern u16 double_movement18[8][8];
54 |
55 |
56 |
57 |
58 | void Calcul_InitPosition(void);
59 |
60 | void Init_MotorMovement(void);
61 | void Calcul_FirPicPosition(void);
62 | void Calcul_SecPicPosition(void);
63 | void Calcul_ThirPicPosition(void);
64 | void Calcul_FourPicPosition(void);
65 | void Calcul_FifPicPosition(void);
66 | void Calcul_SixPicPosition(void);
67 | void RetuIni_AftPic(void);
68 |
69 | void Calcul_Uclockwise90(void);
70 | void Calcul_Dclockwise90(void);
71 | void Calcul_Lclockwise90(void);
72 | void Calcul_Rclockwise90(void);
73 | void Calcul_Fclockwise90(void);
74 | void Calcul_Bclockwise90(void);
75 |
76 | void Calcul_Uanticlockwise90(void);
77 | void Calcul_Danticlockwise90(void);
78 | void Calcul_Lanticlockwise90(void);
79 | void Calcul_Ranticlockwise90(void);
80 | void Calcul_Fanticlockwise90(void);
81 | void Calcul_Banticlockwise90(void);
82 |
83 | void Calcul_Double1(void);
84 | void Calcul_Double2(void);
85 | void Calcul_Double3(void);
86 | void Calcul_Double4(void);
87 | void Calcul_Double5(void);
88 | void Calcul_Double6(void);
89 | void Calcul_Double7(void);
90 | void Calcul_Double8(void);
91 | void Calcul_Double9(void);
92 | void Calcul_Double10(void);
93 | void Calcul_Double11(void);
94 | void Calcul_Double12(void);
95 | void Calcul_Double13(void);
96 | void Calcul_Double14(void);
97 | void Calcul_Double15(void);
98 | void Calcul_Double16(void);
99 | void Calcul_Double17(void);
100 | void Calcul_Double18(void);
101 |
102 |
103 | void Calcul_Uclock180(void);
104 | void Calcul_Dclock180(void);
105 |
106 | void Init_TotalArray(void);
107 | void Init_PWM(void);
108 | void SolvecubeArray_ToBufferArray(void);
109 | void PicArray_ToBufferArray(u16 (*array)[8],u16 line_num);
110 |
111 |
112 | #endif
113 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/HARDWARE/TIMER/timer.h:
--------------------------------------------------------------------------------
1 | #ifndef __TIMER_H
2 | #define __TIMER_H
3 | #include "sys.h"
4 |
5 | extern u8 flag_vpwm; /*插补标志位*/
6 |
7 | void TIM3_Int_Init(u16 arr,u16 psc);
8 | void TIM4_Int_Init(u16 arr,u16 psc);
9 | void TIM3_Set_Time(u16 arr);
10 | void TIM4_Set_Time(u16 arr);
11 |
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/Read Me.txt:
--------------------------------------------------------------------------------
1 | 1.工程文件在USER中。
2 | 2.软件平台为KEIL5。
3 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/inc/stm32f10x_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_crc.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the CRC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_CRC_H
25 | #define __STM32F10x_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /** @defgroup CRC_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup CRC_Exported_Constants
51 | * @{
52 | */
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /** @defgroup CRC_Exported_Macros
59 | * @{
60 | */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup CRC_Exported_Functions
67 | * @{
68 | */
69 |
70 | void CRC_ResetDR(void);
71 | uint32_t CRC_CalcCRC(uint32_t Data);
72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
73 | uint32_t CRC_GetCRC(void);
74 | void CRC_SetIDRegister(uint8_t IDValue);
75 | uint8_t CRC_GetIDRegister(void);
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif /* __STM32F10x_CRC_H */
82 | /**
83 | * @}
84 | */
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
95 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/inc/stm32f10x_dbgmcu.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_dbgmcu.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the DBGMCU
8 | * firmware library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_DBGMCU_H
25 | #define __STM32F10x_DBGMCU_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup DBGMCU
39 | * @{
40 | */
41 |
42 | /** @defgroup DBGMCU_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup DBGMCU_Exported_Constants
51 | * @{
52 | */
53 |
54 | #define DBGMCU_SLEEP ((uint32_t)0x00000001)
55 | #define DBGMCU_STOP ((uint32_t)0x00000002)
56 | #define DBGMCU_STANDBY ((uint32_t)0x00000004)
57 | #define DBGMCU_IWDG_STOP ((uint32_t)0x00000100)
58 | #define DBGMCU_WWDG_STOP ((uint32_t)0x00000200)
59 | #define DBGMCU_TIM1_STOP ((uint32_t)0x00000400)
60 | #define DBGMCU_TIM2_STOP ((uint32_t)0x00000800)
61 | #define DBGMCU_TIM3_STOP ((uint32_t)0x00001000)
62 | #define DBGMCU_TIM4_STOP ((uint32_t)0x00002000)
63 | #define DBGMCU_CAN1_STOP ((uint32_t)0x00004000)
64 | #define DBGMCU_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00008000)
65 | #define DBGMCU_I2C2_SMBUS_TIMEOUT ((uint32_t)0x00010000)
66 | #define DBGMCU_TIM8_STOP ((uint32_t)0x00020000)
67 | #define DBGMCU_TIM5_STOP ((uint32_t)0x00040000)
68 | #define DBGMCU_TIM6_STOP ((uint32_t)0x00080000)
69 | #define DBGMCU_TIM7_STOP ((uint32_t)0x00100000)
70 | #define DBGMCU_CAN2_STOP ((uint32_t)0x00200000)
71 | #define DBGMCU_TIM15_STOP ((uint32_t)0x00400000)
72 | #define DBGMCU_TIM16_STOP ((uint32_t)0x00800000)
73 | #define DBGMCU_TIM17_STOP ((uint32_t)0x01000000)
74 | #define DBGMCU_TIM12_STOP ((uint32_t)0x02000000)
75 | #define DBGMCU_TIM13_STOP ((uint32_t)0x04000000)
76 | #define DBGMCU_TIM14_STOP ((uint32_t)0x08000000)
77 | #define DBGMCU_TIM9_STOP ((uint32_t)0x10000000)
78 | #define DBGMCU_TIM10_STOP ((uint32_t)0x20000000)
79 | #define DBGMCU_TIM11_STOP ((uint32_t)0x40000000)
80 |
81 | #define IS_DBGMCU_PERIPH(PERIPH) ((((PERIPH) & 0x800000F8) == 0x00) && ((PERIPH) != 0x00))
82 | /**
83 | * @}
84 | */
85 |
86 | /** @defgroup DBGMCU_Exported_Macros
87 | * @{
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /** @defgroup DBGMCU_Exported_Functions
95 | * @{
96 | */
97 |
98 | uint32_t DBGMCU_GetREVID(void);
99 | uint32_t DBGMCU_GetDEVID(void);
100 | void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState);
101 |
102 | #ifdef __cplusplus
103 | }
104 | #endif
105 |
106 | #endif /* __STM32F10x_DBGMCU_H */
107 | /**
108 | * @}
109 | */
110 |
111 | /**
112 | * @}
113 | */
114 |
115 | /**
116 | * @}
117 | */
118 |
119 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
120 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/inc/stm32f10x_iwdg.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_iwdg.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the IWDG
8 | * firmware library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_IWDG_H
25 | #define __STM32F10x_IWDG_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup IWDG
39 | * @{
40 | */
41 |
42 | /** @defgroup IWDG_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup IWDG_Exported_Constants
51 | * @{
52 | */
53 |
54 | /** @defgroup IWDG_WriteAccess
55 | * @{
56 | */
57 |
58 | #define IWDG_WriteAccess_Enable ((uint16_t)0x5555)
59 | #define IWDG_WriteAccess_Disable ((uint16_t)0x0000)
60 | #define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \
61 | ((ACCESS) == IWDG_WriteAccess_Disable))
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup IWDG_prescaler
67 | * @{
68 | */
69 |
70 | #define IWDG_Prescaler_4 ((uint8_t)0x00)
71 | #define IWDG_Prescaler_8 ((uint8_t)0x01)
72 | #define IWDG_Prescaler_16 ((uint8_t)0x02)
73 | #define IWDG_Prescaler_32 ((uint8_t)0x03)
74 | #define IWDG_Prescaler_64 ((uint8_t)0x04)
75 | #define IWDG_Prescaler_128 ((uint8_t)0x05)
76 | #define IWDG_Prescaler_256 ((uint8_t)0x06)
77 | #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \
78 | ((PRESCALER) == IWDG_Prescaler_8) || \
79 | ((PRESCALER) == IWDG_Prescaler_16) || \
80 | ((PRESCALER) == IWDG_Prescaler_32) || \
81 | ((PRESCALER) == IWDG_Prescaler_64) || \
82 | ((PRESCALER) == IWDG_Prescaler_128)|| \
83 | ((PRESCALER) == IWDG_Prescaler_256))
84 | /**
85 | * @}
86 | */
87 |
88 | /** @defgroup IWDG_Flag
89 | * @{
90 | */
91 |
92 | #define IWDG_FLAG_PVU ((uint16_t)0x0001)
93 | #define IWDG_FLAG_RVU ((uint16_t)0x0002)
94 | #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU))
95 | #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF)
96 | /**
97 | * @}
98 | */
99 |
100 | /**
101 | * @}
102 | */
103 |
104 | /** @defgroup IWDG_Exported_Macros
105 | * @{
106 | */
107 |
108 | /**
109 | * @}
110 | */
111 |
112 | /** @defgroup IWDG_Exported_Functions
113 | * @{
114 | */
115 |
116 | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess);
117 | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler);
118 | void IWDG_SetReload(uint16_t Reload);
119 | void IWDG_ReloadCounter(void);
120 | void IWDG_Enable(void);
121 | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG);
122 |
123 | #ifdef __cplusplus
124 | }
125 | #endif
126 |
127 | #endif /* __STM32F10x_IWDG_H */
128 | /**
129 | * @}
130 | */
131 |
132 | /**
133 | * @}
134 | */
135 |
136 | /**
137 | * @}
138 | */
139 |
140 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
141 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/inc/stm32f10x_pwr.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_pwr.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the PWR firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_PWR_H
25 | #define __STM32F10x_PWR_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup PWR
39 | * @{
40 | */
41 |
42 | /** @defgroup PWR_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup PWR_Exported_Constants
51 | * @{
52 | */
53 |
54 | /** @defgroup PVD_detection_level
55 | * @{
56 | */
57 |
58 | #define PWR_PVDLevel_2V2 ((uint32_t)0x00000000)
59 | #define PWR_PVDLevel_2V3 ((uint32_t)0x00000020)
60 | #define PWR_PVDLevel_2V4 ((uint32_t)0x00000040)
61 | #define PWR_PVDLevel_2V5 ((uint32_t)0x00000060)
62 | #define PWR_PVDLevel_2V6 ((uint32_t)0x00000080)
63 | #define PWR_PVDLevel_2V7 ((uint32_t)0x000000A0)
64 | #define PWR_PVDLevel_2V8 ((uint32_t)0x000000C0)
65 | #define PWR_PVDLevel_2V9 ((uint32_t)0x000000E0)
66 | #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_2V2) || ((LEVEL) == PWR_PVDLevel_2V3)|| \
67 | ((LEVEL) == PWR_PVDLevel_2V4) || ((LEVEL) == PWR_PVDLevel_2V5)|| \
68 | ((LEVEL) == PWR_PVDLevel_2V6) || ((LEVEL) == PWR_PVDLevel_2V7)|| \
69 | ((LEVEL) == PWR_PVDLevel_2V8) || ((LEVEL) == PWR_PVDLevel_2V9))
70 | /**
71 | * @}
72 | */
73 |
74 | /** @defgroup Regulator_state_is_STOP_mode
75 | * @{
76 | */
77 |
78 | #define PWR_Regulator_ON ((uint32_t)0x00000000)
79 | #define PWR_Regulator_LowPower ((uint32_t)0x00000001)
80 | #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \
81 | ((REGULATOR) == PWR_Regulator_LowPower))
82 | /**
83 | * @}
84 | */
85 |
86 | /** @defgroup STOP_mode_entry
87 | * @{
88 | */
89 |
90 | #define PWR_STOPEntry_WFI ((uint8_t)0x01)
91 | #define PWR_STOPEntry_WFE ((uint8_t)0x02)
92 | #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE))
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | /** @defgroup PWR_Flag
99 | * @{
100 | */
101 |
102 | #define PWR_FLAG_WU ((uint32_t)0x00000001)
103 | #define PWR_FLAG_SB ((uint32_t)0x00000002)
104 | #define PWR_FLAG_PVDO ((uint32_t)0x00000004)
105 | #define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \
106 | ((FLAG) == PWR_FLAG_PVDO))
107 |
108 | #define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB))
109 | /**
110 | * @}
111 | */
112 |
113 | /**
114 | * @}
115 | */
116 |
117 | /** @defgroup PWR_Exported_Macros
118 | * @{
119 | */
120 |
121 | /**
122 | * @}
123 | */
124 |
125 | /** @defgroup PWR_Exported_Functions
126 | * @{
127 | */
128 |
129 | void PWR_DeInit(void);
130 | void PWR_BackupAccessCmd(FunctionalState NewState);
131 | void PWR_PVDCmd(FunctionalState NewState);
132 | void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel);
133 | void PWR_WakeUpPinCmd(FunctionalState NewState);
134 | void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry);
135 | void PWR_EnterSTANDBYMode(void);
136 | FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG);
137 | void PWR_ClearFlag(uint32_t PWR_FLAG);
138 |
139 | #ifdef __cplusplus
140 | }
141 | #endif
142 |
143 | #endif /* __STM32F10x_PWR_H */
144 | /**
145 | * @}
146 | */
147 |
148 | /**
149 | * @}
150 | */
151 |
152 | /**
153 | * @}
154 | */
155 |
156 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
157 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/inc/stm32f10x_rtc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_rtc.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the RTC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_RTC_H
25 | #define __STM32F10x_RTC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup RTC
39 | * @{
40 | */
41 |
42 | /** @defgroup RTC_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup RTC_Exported_Constants
51 | * @{
52 | */
53 |
54 | /** @defgroup RTC_interrupts_define
55 | * @{
56 | */
57 |
58 | #define RTC_IT_OW ((uint16_t)0x0004) /*!< Overflow interrupt */
59 | #define RTC_IT_ALR ((uint16_t)0x0002) /*!< Alarm interrupt */
60 | #define RTC_IT_SEC ((uint16_t)0x0001) /*!< Second interrupt */
61 | #define IS_RTC_IT(IT) ((((IT) & (uint16_t)0xFFF8) == 0x00) && ((IT) != 0x00))
62 | #define IS_RTC_GET_IT(IT) (((IT) == RTC_IT_OW) || ((IT) == RTC_IT_ALR) || \
63 | ((IT) == RTC_IT_SEC))
64 | /**
65 | * @}
66 | */
67 |
68 | /** @defgroup RTC_interrupts_flags
69 | * @{
70 | */
71 |
72 | #define RTC_FLAG_RTOFF ((uint16_t)0x0020) /*!< RTC Operation OFF flag */
73 | #define RTC_FLAG_RSF ((uint16_t)0x0008) /*!< Registers Synchronized flag */
74 | #define RTC_FLAG_OW ((uint16_t)0x0004) /*!< Overflow flag */
75 | #define RTC_FLAG_ALR ((uint16_t)0x0002) /*!< Alarm flag */
76 | #define RTC_FLAG_SEC ((uint16_t)0x0001) /*!< Second flag */
77 | #define IS_RTC_CLEAR_FLAG(FLAG) ((((FLAG) & (uint16_t)0xFFF0) == 0x00) && ((FLAG) != 0x00))
78 | #define IS_RTC_GET_FLAG(FLAG) (((FLAG) == RTC_FLAG_RTOFF) || ((FLAG) == RTC_FLAG_RSF) || \
79 | ((FLAG) == RTC_FLAG_OW) || ((FLAG) == RTC_FLAG_ALR) || \
80 | ((FLAG) == RTC_FLAG_SEC))
81 | #define IS_RTC_PRESCALER(PRESCALER) ((PRESCALER) <= 0xFFFFF)
82 |
83 | /**
84 | * @}
85 | */
86 |
87 | /**
88 | * @}
89 | */
90 |
91 | /** @defgroup RTC_Exported_Macros
92 | * @{
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | /** @defgroup RTC_Exported_Functions
100 | * @{
101 | */
102 |
103 | void RTC_ITConfig(uint16_t RTC_IT, FunctionalState NewState);
104 | void RTC_EnterConfigMode(void);
105 | void RTC_ExitConfigMode(void);
106 | uint32_t RTC_GetCounter(void);
107 | void RTC_SetCounter(uint32_t CounterValue);
108 | void RTC_SetPrescaler(uint32_t PrescalerValue);
109 | void RTC_SetAlarm(uint32_t AlarmValue);
110 | uint32_t RTC_GetDivider(void);
111 | void RTC_WaitForLastTask(void);
112 | void RTC_WaitForSynchro(void);
113 | FlagStatus RTC_GetFlagStatus(uint16_t RTC_FLAG);
114 | void RTC_ClearFlag(uint16_t RTC_FLAG);
115 | ITStatus RTC_GetITStatus(uint16_t RTC_IT);
116 | void RTC_ClearITPendingBit(uint16_t RTC_IT);
117 |
118 | #ifdef __cplusplus
119 | }
120 | #endif
121 |
122 | #endif /* __STM32F10x_RTC_H */
123 | /**
124 | * @}
125 | */
126 |
127 | /**
128 | * @}
129 | */
130 |
131 | /**
132 | * @}
133 | */
134 |
135 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
136 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/inc/stm32f10x_wwdg.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_wwdg.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the WWDG firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_WWDG_H
25 | #define __STM32F10x_WWDG_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup WWDG
39 | * @{
40 | */
41 |
42 | /** @defgroup WWDG_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup WWDG_Exported_Constants
51 | * @{
52 | */
53 |
54 | /** @defgroup WWDG_Prescaler
55 | * @{
56 | */
57 |
58 | #define WWDG_Prescaler_1 ((uint32_t)0x00000000)
59 | #define WWDG_Prescaler_2 ((uint32_t)0x00000080)
60 | #define WWDG_Prescaler_4 ((uint32_t)0x00000100)
61 | #define WWDG_Prescaler_8 ((uint32_t)0x00000180)
62 | #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
63 | ((PRESCALER) == WWDG_Prescaler_2) || \
64 | ((PRESCALER) == WWDG_Prescaler_4) || \
65 | ((PRESCALER) == WWDG_Prescaler_8))
66 | #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
67 | #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
68 |
69 | /**
70 | * @}
71 | */
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | /** @defgroup WWDG_Exported_Macros
78 | * @{
79 | */
80 | /**
81 | * @}
82 | */
83 |
84 | /** @defgroup WWDG_Exported_Functions
85 | * @{
86 | */
87 |
88 | void WWDG_DeInit(void);
89 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
90 | void WWDG_SetWindowValue(uint8_t WindowValue);
91 | void WWDG_EnableIT(void);
92 | void WWDG_SetCounter(uint8_t Counter);
93 | void WWDG_Enable(uint8_t Counter);
94 | FlagStatus WWDG_GetFlagStatus(void);
95 | void WWDG_ClearFlag(void);
96 |
97 | #ifdef __cplusplus
98 | }
99 | #endif
100 |
101 | #endif /* __STM32F10x_WWDG_H */
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /**
112 | * @}
113 | */
114 |
115 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
116 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_crc.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_crc.c
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file provides all the CRC firmware functions.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 | #include "stm32f10x_crc.h"
24 |
25 | /** @addtogroup STM32F10x_StdPeriph_Driver
26 | * @{
27 | */
28 |
29 | /** @defgroup CRC
30 | * @brief CRC driver modules
31 | * @{
32 | */
33 |
34 | /** @defgroup CRC_Private_TypesDefinitions
35 | * @{
36 | */
37 |
38 | /**
39 | * @}
40 | */
41 |
42 | /** @defgroup CRC_Private_Defines
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup CRC_Private_Macros
51 | * @{
52 | */
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /** @defgroup CRC_Private_Variables
59 | * @{
60 | */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup CRC_Private_FunctionPrototypes
67 | * @{
68 | */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /** @defgroup CRC_Private_Functions
75 | * @{
76 | */
77 |
78 | /**
79 | * @brief Resets the CRC Data register (DR).
80 | * @param None
81 | * @retval None
82 | */
83 | void CRC_ResetDR(void)
84 | {
85 | /* Reset CRC generator */
86 | CRC->CR = CRC_CR_RESET;
87 | }
88 |
89 | /**
90 | * @brief Computes the 32-bit CRC of a given data word(32-bit).
91 | * @param Data: data word(32-bit) to compute its CRC
92 | * @retval 32-bit CRC
93 | */
94 | uint32_t CRC_CalcCRC(uint32_t Data)
95 | {
96 | CRC->DR = Data;
97 |
98 | return (CRC->DR);
99 | }
100 |
101 | /**
102 | * @brief Computes the 32-bit CRC of a given buffer of data word(32-bit).
103 | * @param pBuffer: pointer to the buffer containing the data to be computed
104 | * @param BufferLength: length of the buffer to be computed
105 | * @retval 32-bit CRC
106 | */
107 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength)
108 | {
109 | uint32_t index = 0;
110 |
111 | for(index = 0; index < BufferLength; index++)
112 | {
113 | CRC->DR = pBuffer[index];
114 | }
115 | return (CRC->DR);
116 | }
117 |
118 | /**
119 | * @brief Returns the current CRC value.
120 | * @param None
121 | * @retval 32-bit CRC
122 | */
123 | uint32_t CRC_GetCRC(void)
124 | {
125 | return (CRC->DR);
126 | }
127 |
128 | /**
129 | * @brief Stores a 8-bit data in the Independent Data(ID) register.
130 | * @param IDValue: 8-bit value to be stored in the ID register
131 | * @retval None
132 | */
133 | void CRC_SetIDRegister(uint8_t IDValue)
134 | {
135 | CRC->IDR = IDValue;
136 | }
137 |
138 | /**
139 | * @brief Returns the 8-bit data stored in the Independent Data(ID) register
140 | * @param None
141 | * @retval 8-bit value of the ID register
142 | */
143 | uint8_t CRC_GetIDRegister(void)
144 | {
145 | return (CRC->IDR);
146 | }
147 |
148 | /**
149 | * @}
150 | */
151 |
152 | /**
153 | * @}
154 | */
155 |
156 | /**
157 | * @}
158 | */
159 |
160 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
161 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_dbgmcu.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_dbgmcu.c
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file provides all the DBGMCU firmware functions.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 | #include "stm32f10x_dbgmcu.h"
24 |
25 | /** @addtogroup STM32F10x_StdPeriph_Driver
26 | * @{
27 | */
28 |
29 | /** @defgroup DBGMCU
30 | * @brief DBGMCU driver modules
31 | * @{
32 | */
33 |
34 | /** @defgroup DBGMCU_Private_TypesDefinitions
35 | * @{
36 | */
37 |
38 | /**
39 | * @}
40 | */
41 |
42 | /** @defgroup DBGMCU_Private_Defines
43 | * @{
44 | */
45 |
46 | #define IDCODE_DEVID_MASK ((uint32_t)0x00000FFF)
47 | /**
48 | * @}
49 | */
50 |
51 | /** @defgroup DBGMCU_Private_Macros
52 | * @{
53 | */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /** @defgroup DBGMCU_Private_Variables
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @defgroup DBGMCU_Private_FunctionPrototypes
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @defgroup DBGMCU_Private_Functions
76 | * @{
77 | */
78 |
79 | /**
80 | * @brief Returns the device revision identifier.
81 | * @param None
82 | * @retval Device revision identifier
83 | */
84 | uint32_t DBGMCU_GetREVID(void)
85 | {
86 | return(DBGMCU->IDCODE >> 16);
87 | }
88 |
89 | /**
90 | * @brief Returns the device identifier.
91 | * @param None
92 | * @retval Device identifier
93 | */
94 | uint32_t DBGMCU_GetDEVID(void)
95 | {
96 | return(DBGMCU->IDCODE & IDCODE_DEVID_MASK);
97 | }
98 |
99 | /**
100 | * @brief Configures the specified peripheral and low power mode behavior
101 | * when the MCU under Debug mode.
102 | * @param DBGMCU_Periph: specifies the peripheral and low power mode.
103 | * This parameter can be any combination of the following values:
104 | * @arg DBGMCU_SLEEP: Keep debugger connection during SLEEP mode
105 | * @arg DBGMCU_STOP: Keep debugger connection during STOP mode
106 | * @arg DBGMCU_STANDBY: Keep debugger connection during STANDBY mode
107 | * @arg DBGMCU_IWDG_STOP: Debug IWDG stopped when Core is halted
108 | * @arg DBGMCU_WWDG_STOP: Debug WWDG stopped when Core is halted
109 | * @arg DBGMCU_TIM1_STOP: TIM1 counter stopped when Core is halted
110 | * @arg DBGMCU_TIM2_STOP: TIM2 counter stopped when Core is halted
111 | * @arg DBGMCU_TIM3_STOP: TIM3 counter stopped when Core is halted
112 | * @arg DBGMCU_TIM4_STOP: TIM4 counter stopped when Core is halted
113 | * @arg DBGMCU_CAN1_STOP: Debug CAN2 stopped when Core is halted
114 | * @arg DBGMCU_I2C1_SMBUS_TIMEOUT: I2C1 SMBUS timeout mode stopped when Core is halted
115 | * @arg DBGMCU_I2C2_SMBUS_TIMEOUT: I2C2 SMBUS timeout mode stopped when Core is halted
116 | * @arg DBGMCU_TIM5_STOP: TIM5 counter stopped when Core is halted
117 | * @arg DBGMCU_TIM6_STOP: TIM6 counter stopped when Core is halted
118 | * @arg DBGMCU_TIM7_STOP: TIM7 counter stopped when Core is halted
119 | * @arg DBGMCU_TIM8_STOP: TIM8 counter stopped when Core is halted
120 | * @arg DBGMCU_CAN2_STOP: Debug CAN2 stopped when Core is halted
121 | * @arg DBGMCU_TIM15_STOP: TIM15 counter stopped when Core is halted
122 | * @arg DBGMCU_TIM16_STOP: TIM16 counter stopped when Core is halted
123 | * @arg DBGMCU_TIM17_STOP: TIM17 counter stopped when Core is halted
124 | * @arg DBGMCU_TIM9_STOP: TIM9 counter stopped when Core is halted
125 | * @arg DBGMCU_TIM10_STOP: TIM10 counter stopped when Core is halted
126 | * @arg DBGMCU_TIM11_STOP: TIM11 counter stopped when Core is halted
127 | * @arg DBGMCU_TIM12_STOP: TIM12 counter stopped when Core is halted
128 | * @arg DBGMCU_TIM13_STOP: TIM13 counter stopped when Core is halted
129 | * @arg DBGMCU_TIM14_STOP: TIM14 counter stopped when Core is halted
130 | * @param NewState: new state of the specified peripheral in Debug mode.
131 | * This parameter can be: ENABLE or DISABLE.
132 | * @retval None
133 | */
134 | void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState)
135 | {
136 | /* Check the parameters */
137 | assert_param(IS_DBGMCU_PERIPH(DBGMCU_Periph));
138 | assert_param(IS_FUNCTIONAL_STATE(NewState));
139 |
140 | if (NewState != DISABLE)
141 | {
142 | DBGMCU->CR |= DBGMCU_Periph;
143 | }
144 | else
145 | {
146 | DBGMCU->CR &= ~DBGMCU_Periph;
147 | }
148 | }
149 |
150 | /**
151 | * @}
152 | */
153 |
154 | /**
155 | * @}
156 | */
157 |
158 | /**
159 | * @}
160 | */
161 |
162 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
163 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_flash.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_flash.c
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_i2c.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_i2c.c
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_iwdg.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_iwdg.c
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file provides all the IWDG firmware functions.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 | #include "stm32f10x_iwdg.h"
24 |
25 | /** @addtogroup STM32F10x_StdPeriph_Driver
26 | * @{
27 | */
28 |
29 | /** @defgroup IWDG
30 | * @brief IWDG driver modules
31 | * @{
32 | */
33 |
34 | /** @defgroup IWDG_Private_TypesDefinitions
35 | * @{
36 | */
37 |
38 | /**
39 | * @}
40 | */
41 |
42 | /** @defgroup IWDG_Private_Defines
43 | * @{
44 | */
45 |
46 | /* ---------------------- IWDG registers bit mask ----------------------------*/
47 |
48 | /* KR register bit mask */
49 | #define KR_KEY_Reload ((uint16_t)0xAAAA)
50 | #define KR_KEY_Enable ((uint16_t)0xCCCC)
51 |
52 | /**
53 | * @}
54 | */
55 |
56 | /** @defgroup IWDG_Private_Macros
57 | * @{
58 | */
59 |
60 | /**
61 | * @}
62 | */
63 |
64 | /** @defgroup IWDG_Private_Variables
65 | * @{
66 | */
67 |
68 | /**
69 | * @}
70 | */
71 |
72 | /** @defgroup IWDG_Private_FunctionPrototypes
73 | * @{
74 | */
75 |
76 | /**
77 | * @}
78 | */
79 |
80 | /** @defgroup IWDG_Private_Functions
81 | * @{
82 | */
83 |
84 | /**
85 | * @brief Enables or disables write access to IWDG_PR and IWDG_RLR registers.
86 | * @param IWDG_WriteAccess: new state of write access to IWDG_PR and IWDG_RLR registers.
87 | * This parameter can be one of the following values:
88 | * @arg IWDG_WriteAccess_Enable: Enable write access to IWDG_PR and IWDG_RLR registers
89 | * @arg IWDG_WriteAccess_Disable: Disable write access to IWDG_PR and IWDG_RLR registers
90 | * @retval None
91 | */
92 | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess)
93 | {
94 | /* Check the parameters */
95 | assert_param(IS_IWDG_WRITE_ACCESS(IWDG_WriteAccess));
96 | IWDG->KR = IWDG_WriteAccess;
97 | }
98 |
99 | /**
100 | * @brief Sets IWDG Prescaler value.
101 | * @param IWDG_Prescaler: specifies the IWDG Prescaler value.
102 | * This parameter can be one of the following values:
103 | * @arg IWDG_Prescaler_4: IWDG prescaler set to 4
104 | * @arg IWDG_Prescaler_8: IWDG prescaler set to 8
105 | * @arg IWDG_Prescaler_16: IWDG prescaler set to 16
106 | * @arg IWDG_Prescaler_32: IWDG prescaler set to 32
107 | * @arg IWDG_Prescaler_64: IWDG prescaler set to 64
108 | * @arg IWDG_Prescaler_128: IWDG prescaler set to 128
109 | * @arg IWDG_Prescaler_256: IWDG prescaler set to 256
110 | * @retval None
111 | */
112 | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler)
113 | {
114 | /* Check the parameters */
115 | assert_param(IS_IWDG_PRESCALER(IWDG_Prescaler));
116 | IWDG->PR = IWDG_Prescaler;
117 | }
118 |
119 | /**
120 | * @brief Sets IWDG Reload value.
121 | * @param Reload: specifies the IWDG Reload value.
122 | * This parameter must be a number between 0 and 0x0FFF.
123 | * @retval None
124 | */
125 | void IWDG_SetReload(uint16_t Reload)
126 | {
127 | /* Check the parameters */
128 | assert_param(IS_IWDG_RELOAD(Reload));
129 | IWDG->RLR = Reload;
130 | }
131 |
132 | /**
133 | * @brief Reloads IWDG counter with value defined in the reload register
134 | * (write access to IWDG_PR and IWDG_RLR registers disabled).
135 | * @param None
136 | * @retval None
137 | */
138 | void IWDG_ReloadCounter(void)
139 | {
140 | IWDG->KR = KR_KEY_Reload;
141 | }
142 |
143 | /**
144 | * @brief Enables IWDG (write access to IWDG_PR and IWDG_RLR registers disabled).
145 | * @param None
146 | * @retval None
147 | */
148 | void IWDG_Enable(void)
149 | {
150 | IWDG->KR = KR_KEY_Enable;
151 | }
152 |
153 | /**
154 | * @brief Checks whether the specified IWDG flag is set or not.
155 | * @param IWDG_FLAG: specifies the flag to check.
156 | * This parameter can be one of the following values:
157 | * @arg IWDG_FLAG_PVU: Prescaler Value Update on going
158 | * @arg IWDG_FLAG_RVU: Reload Value Update on going
159 | * @retval The new state of IWDG_FLAG (SET or RESET).
160 | */
161 | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG)
162 | {
163 | FlagStatus bitstatus = RESET;
164 | /* Check the parameters */
165 | assert_param(IS_IWDG_FLAG(IWDG_FLAG));
166 | if ((IWDG->SR & IWDG_FLAG) != (uint32_t)RESET)
167 | {
168 | bitstatus = SET;
169 | }
170 | else
171 | {
172 | bitstatus = RESET;
173 | }
174 | /* Return the flag status */
175 | return bitstatus;
176 | }
177 |
178 | /**
179 | * @}
180 | */
181 |
182 | /**
183 | * @}
184 | */
185 |
186 | /**
187 | * @}
188 | */
189 |
190 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
191 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_usart.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/STM32F10x_FWLib/src/stm32f10x_usart.c
--------------------------------------------------------------------------------
/mcu/Cube Robot/SYSTEM/delay/delay.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/SYSTEM/delay/delay.c
--------------------------------------------------------------------------------
/mcu/Cube Robot/SYSTEM/delay/delay.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/SYSTEM/delay/delay.h
--------------------------------------------------------------------------------
/mcu/Cube Robot/SYSTEM/sys/sys.c:
--------------------------------------------------------------------------------
1 | #include "sys.h"
2 |
3 |
4 |
5 | void NVIC_Configuration(void)
6 | {
7 |
8 | NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); /*设置NVIC中断分组2:2位抢占优先级,2位响应优先级*/
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/SYSTEM/sys/sys.h:
--------------------------------------------------------------------------------
1 | #ifndef __SYS_H
2 | #define __SYS_H
3 | #include "stm32f10x.h"
4 |
5 |
6 | /*位带操作,实现51类似的GPIO控制功能
7 | *具体实现思想,参考<>第五章(87页~92页).
8 | *IO口操作宏定义
9 | */
10 | #define BITBAND(addr, bitnum) ((addr & 0xF0000000)+0x2000000+((addr &0xFFFFF)<<5)+(bitnum<<2))
11 | #define MEM_ADDR(addr) *((volatile unsigned long *)(addr))
12 | #define BIT_ADDR(addr, bitnum) MEM_ADDR(BITBAND(addr, bitnum))
13 |
14 | /*IO口地址映射*/
15 | #define GPIOA_ODR_Addr (GPIOA_BASE+12) //0x4001080C
16 | #define GPIOB_ODR_Addr (GPIOB_BASE+12) //0x40010C0C
17 | #define GPIOC_ODR_Addr (GPIOC_BASE+12) //0x4001100C
18 | #define GPIOD_ODR_Addr (GPIOD_BASE+12) //0x4001140C
19 | #define GPIOE_ODR_Addr (GPIOE_BASE+12) //0x4001180C
20 | #define GPIOF_ODR_Addr (GPIOF_BASE+12) //0x40011A0C
21 | #define GPIOG_ODR_Addr (GPIOG_BASE+12) //0x40011E0C
22 |
23 | #define GPIOA_IDR_Addr (GPIOA_BASE+8) //0x40010808
24 | #define GPIOB_IDR_Addr (GPIOB_BASE+8) //0x40010C08
25 | #define GPIOC_IDR_Addr (GPIOC_BASE+8) //0x40011008
26 | #define GPIOD_IDR_Addr (GPIOD_BASE+8) //0x40011408
27 | #define GPIOE_IDR_Addr (GPIOE_BASE+8) //0x40011808
28 | #define GPIOF_IDR_Addr (GPIOF_BASE+8) //0x40011A08
29 | #define GPIOG_IDR_Addr (GPIOG_BASE+8) //0x40011E08
30 |
31 | /*IO口操作,只对单一的IO口!
32 | *确保n的值小于16!
33 | */
34 | #define PAout(n) BIT_ADDR(GPIOA_ODR_Addr,n) //输出
35 | #define PAin(n) BIT_ADDR(GPIOA_IDR_Addr,n) //输入
36 |
37 | #define PBout(n) BIT_ADDR(GPIOB_ODR_Addr,n) //输出
38 | #define PBin(n) BIT_ADDR(GPIOB_IDR_Addr,n) //输入
39 |
40 | #define PCout(n) BIT_ADDR(GPIOC_ODR_Addr,n) //输出
41 | #define PCin(n) BIT_ADDR(GPIOC_IDR_Addr,n) //输入
42 |
43 | #define PDout(n) BIT_ADDR(GPIOD_ODR_Addr,n) //输出
44 | #define PDin(n) BIT_ADDR(GPIOD_IDR_Addr,n) //输入
45 |
46 | #define PEout(n) BIT_ADDR(GPIOE_ODR_Addr,n) //输出
47 | #define PEin(n) BIT_ADDR(GPIOE_IDR_Addr,n) //输入
48 |
49 | #define PFout(n) BIT_ADDR(GPIOF_ODR_Addr,n) //输出
50 | #define PFin(n) BIT_ADDR(GPIOF_IDR_Addr,n) //输入
51 |
52 | #define PGout(n) BIT_ADDR(GPIOG_ODR_Addr,n) //输出
53 | #define PGin(n) BIT_ADDR(GPIOG_IDR_Addr,n) //输入
54 |
55 | void NVIC_Configuration(void);
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/SYSTEM/usart/usart.h:
--------------------------------------------------------------------------------
1 | #ifndef __USART__H__
2 | #define __USART__H__
3 |
4 | #include "stm32f10x.h"
5 |
6 | extern u8 rece_flag;
7 | extern u8 uart_rdata; /*通过串口发来的字符*/
8 | extern u8 rece_string[50]; /*存放接收到的字符串*/
9 |
10 |
11 |
12 | u8 asc_to_num(u8 asc);
13 | void USART_SendChar(u8 siglechar);
14 | void USART1_Config(void);
15 | void USART_SendString (unsigned char *str);
16 | void USART_SendChar8(u8 num);
17 | void USART_SendInt16(u16 num);
18 | void NVIC_USART1_Configuration(void);
19 |
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/JLink Regs CM3.txt:
--------------------------------------------------------------------------------
1 | 0: R0: 0x00
2 | 1: R1: 0x01
3 | 2: R2: 0x02
4 | 3: R3: 0x03
5 | 4: R4: 0x04
6 | 5: R5: 0x05
7 | 6: R6: 0x06
8 | 7: R7: 0x07
9 | 8: R8: 0x08
10 | 9: R9: 0x09
11 | 10: R10: 0x0a
12 | 11: R11: 0x0b
13 | 12: R12: 0x0c
14 | 13: R13: 0x0d
15 | 14: R14: 0x0e
16 | 15: R15: 0x0f
17 | 16: XPSR: 0x10
18 | 17: MSP: 0x11
19 | 18: PSP: 0x12
20 | 19: RAZ: 0x13
21 | 20: CFBP: 0x14
22 | 21: APSR: 0x15
23 | 22: EPSR: 0x16
24 | 23: IPSR: 0x17
25 | 24: PRIMASK: 0x18
26 | 25: BASEPRI: 0x19
27 | 26: FAULTMASK: 0x1a
28 | 27: CONTROL: 0x1b
29 | 28: BASEPRI_MAX: 0x1c
30 | 29: IAPSR: 0x1d
31 | 30: EAPSR: 0x1e
32 | 31: IEPSR: 0x1f
33 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/JLinkSettings.ini:
--------------------------------------------------------------------------------
1 | [FLASH]
2 | SkipProgOnCRCMatch = 1
3 | VerifyDownload = 1
4 | AllowCaching = 1
5 | EnableFlashDL = 2
6 | Override = 0
7 | Device="ADUC7020X62"
8 | [BREAKPOINTS]
9 | ShowInfoWin = 1
10 | EnableFlashBP = 2
11 | BPDuringExecution = 0
12 | [CPU]
13 | OverrideMemMap = 0
14 | AllowSimulation = 1
15 | ScriptFile=""
16 | [SWO]
17 | SWOLogFile=""
18 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/RTE/RTE_Components.h:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Auto generated Run-Time-Environment Component Configuration File
4 | * *** Do not modify ! ***
5 | *
6 | * Project: 'Rube Robot'
7 | * Target: 'Target 1'
8 | */
9 |
10 | #ifndef RTE_COMPONENTS_H
11 | #define RTE_COMPONENTS_H
12 |
13 |
14 | #endif /* RTE_COMPONENTS_H */
15 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/USART.Opt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/USER/USART.Opt
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/main.c:
--------------------------------------------------------------------------------
1 | /*程序描述:魔方机器人下位机控制程序
2 | *主控芯片:STM32F103ZET6,flash:512kb, ram:64kb
3 | *软件平台:KEIL5
4 | *备 注:MG995舵机度数增大的方向为逆时针
5 | *
6 | */
7 | #include "stm32f10x.h"
8 | #include "led.h"
9 | #include "delay.h"
10 | #include "key.h"
11 | #include "sys.h"
12 | #include "usart.h"
13 | #include "timer.h"
14 | #include "motor.h"
15 | #include "movement.h"
16 | #include "instruction.h"
17 | #include "exti.h"
18 |
19 | int main(void)
20 | {
21 | delay_init();
22 | NVIC_Configuration(); /*设置NVIC中断分组2:2位抢占优先级,2位响应优先级*/
23 | LED_Init();
24 | MotorPin_Init(); /*舵机初始化信号线引脚*/
25 | USART1_Config();
26 | Init_TotalArray(); /*计算执行数组*/
27 | Exti_Init();
28 | TIM3_Int_Init(100,100);
29 | TIM4_Int_Init(10000,7199); /*定时1S*/
30 | //TIM_Cmd(TIM3, DISABLE); /*接收到指令之后,再打开TIM3*/
31 | //while(!rece_flag);
32 |
33 | while(1)
34 | { /*警告:外部中断ABCDEF的顺序不要颠倒*/
35 |
36 | if(rece_flag==1)
37 | {
38 |
39 | if(rece_string[0]=='#')
40 | {
41 | TIM_Cmd(TIM3, DISABLE); /*先关闭TIM3,避免全局变量被修改*/
42 | motor_speed=250;
43 | SolvecubeArray_ToBufferArray();
44 | }
45 |
46 | change();
47 | TIM_Cmd(TIM3, ENABLE); /*接收到指令之后,再打开TIM3*/
48 | rece_flag=0;
49 |
50 | }
51 |
52 | if(flag_vpwm==1)
53 | {
54 | vpwm(); /*插补角度*/
55 | flag_vpwm=0;
56 | }
57 |
58 | }
59 |
60 | }
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/stm32f10x.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/USER/stm32f10x.h
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/stm32f10x_conf.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file GPIO/IOToggle/stm32f10x_conf.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 08-April-2011
7 | * @brief Library configuration file.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __STM32F10x_CONF_H
24 | #define __STM32F10x_CONF_H
25 |
26 | /* Includes ------------------------------------------------------------------*/
27 | /* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
28 | //#include "stm32f10x_adc.h"
29 | //#include "stm32f10x_bkp.h"
30 | //#include "stm32f10x_can.h"
31 | //#include "stm32f10x_cec.h"
32 | //#include "stm32f10x_crc.h"
33 | //#include "stm32f10x_dac.h"
34 | #include "stm32f10x_dbgmcu.h"
35 | //#include "stm32f10x_dma.h"
36 | #include "stm32f10x_exti.h"
37 | //#include "stm32f10x_flash.h"
38 | //#include "stm32f10x_fsmc.h"
39 | #include "stm32f10x_gpio.h"
40 | //#include "stm32f10x_i2c.h"
41 | //#include "stm32f10x_iwdg.h"
42 | //#include "stm32f10x_pwr.h"
43 | #include "stm32f10x_rcc.h"
44 | //#include "stm32f10x_rtc.h"
45 | //#include "stm32f10x_sdio.h"
46 | //#include "stm32f10x_spi.h"
47 | #include "stm32f10x_tim.h"
48 | #include "stm32f10x_usart.h"
49 | //#include "stm32f10x_wwdg.h"
50 | #include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
51 |
52 | /* Exported types ------------------------------------------------------------*/
53 | /* Exported constants --------------------------------------------------------*/
54 | /* Uncomment the line below to expanse the "assert_param" macro in the
55 | Standard Peripheral Library drivers code */
56 | /* #define USE_FULL_ASSERT 1 */
57 |
58 | /* Exported macro ------------------------------------------------------------*/
59 | #ifdef USE_FULL_ASSERT
60 |
61 | /**
62 | * @brief The assert_param macro is used for function's parameters check.
63 | * @param expr: If expr is false, it calls assert_failed function which reports
64 | * the name of the source file and the source line number of the call
65 | * that failed. If expr is true, it returns no value.
66 | * @retval None
67 | */
68 | #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
69 | /* Exported functions ------------------------------------------------------- */
70 | void assert_failed(uint8_t* file, uint32_t line);
71 | #else
72 | #define assert_param(expr) ((void)0)
73 | #endif /* USE_FULL_ASSERT */
74 |
75 | #endif /* __STM32F10x_CONF_H */
76 |
77 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
78 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/stm32f10x_it.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file GPIO/IOToggle/stm32f10x_it.c
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 08-April-2011
7 | * @brief Main Interrupt Service Routines.
8 | * This file provides template for all exceptions handler and peripherals
9 | * interrupt service routine.
10 | ******************************************************************************
11 | * @attention
12 | *
13 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
14 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
15 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
16 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
17 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
18 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
19 | *
20 | * © COPYRIGHT 2011 STMicroelectronics
21 | ******************************************************************************
22 | */
23 |
24 | /* Includes ------------------------------------------------------------------*/
25 | #include "stm32f10x_it.h"
26 |
27 | void NMI_Handler(void)
28 | {
29 | }
30 |
31 | void HardFault_Handler(void)
32 | {
33 | /* Go to infinite loop when Hard Fault exception occurs */
34 | while (1)
35 | {
36 | }
37 | }
38 |
39 | void MemManage_Handler(void)
40 | {
41 | /* Go to infinite loop when Memory Manage exception occurs */
42 | while (1)
43 | {
44 | }
45 | }
46 |
47 |
48 | void BusFault_Handler(void)
49 | {
50 | /* Go to infinite loop when Bus Fault exception occurs */
51 | while (1)
52 | {
53 | }
54 | }
55 |
56 | void UsageFault_Handler(void)
57 | {
58 | /* Go to infinite loop when Usage Fault exception occurs */
59 | while (1)
60 | {
61 | }
62 | }
63 |
64 | void SVC_Handler(void)
65 | {
66 | }
67 |
68 | void DebugMon_Handler(void)
69 | {
70 | }
71 |
72 | void PendSV_Handler(void)
73 | {
74 | }
75 |
76 | void SysTick_Handler(void)
77 | {
78 | }
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/stm32f10x_it.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/USER/stm32f10x_it.h
--------------------------------------------------------------------------------
/mcu/Cube Robot/USER/system_stm32f10x.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f10x.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f10x_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F10X_H
34 | #define __SYSTEM_STM32F10X_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F10x_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F10x_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /** @addtogroup STM32F10x_System_Exported_Constants
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @addtogroup STM32F10x_System_Exported_Macros
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @addtogroup STM32F10x_System_Exported_Functions
76 | * @{
77 | */
78 |
79 | extern void SystemInit(void);
80 | extern void SystemCoreClockUpdate(void);
81 | /**
82 | * @}
83 | */
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif /*__SYSTEM_STM32F10X_H */
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
99 |
--------------------------------------------------------------------------------
/mcu/Cube Robot/keilkilll.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/mcu/Cube Robot/keilkilll.bat
--------------------------------------------------------------------------------
/picture/20160306.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/picture/20160306.jpg
--------------------------------------------------------------------------------
/reference/Kociemba.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mindcont/RubikRobot/06d20bd4bd57d6cfd294218d03446ca734018e84/reference/Kociemba.pdf
--------------------------------------------------------------------------------