- Timestamp:
- 11/25/12 14:01:35 (8 years ago)
- Branches:
- master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
- Children:
- 71aa88f
- Parents:
- 41c4762
- Location:
- android
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
android/.classpath
r3909100 r1a53973 5 5 <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> 6 6 <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> 7 <classpathentry exported="true" kind="lib" path="libs/ThinkGear.jar"/> 8 <classpathentry kind="lib" path="/home/sc/development/orbit.git/android/libs/usb-serial-for-android-v010.jar"/> 9 <classpathentry exported="true" kind="lib" path="libs/usb-serial-for-android-v010.jar"/> 7 10 <classpathentry kind="output" path="bin/classes"/> 8 11 </classpath> -
android/AndroidManifest.xml
r3909100 r1a53973 1 <?xml version="1.0" encoding="utf-8"?> 1 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" 2 3 package="info.puzzlebox.orbit" … … 5 6 6 7 <uses-sdk 7 android:minSdkVersion=" 8"8 android:minSdkVersion="15" 8 9 android:targetSdkVersion="15" /> 10 <uses-permission android:name="android.permission.BLUETOOTH"/> 11 <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> 12 <uses-feature android:name="android.hardware.usb.host" /> 9 13 10 14 <application … … 14 18 <activity 15 19 android:name=".MainActivity" 16 android:label="@string/title_activity_main" > 17 <meta-data 18 android:name="android.support.PARENT_ACTIVITY" 19 android:value="android.app.ActivityGroup" /> 20 android:label="@string/app_name" > 21 <intent-filter> 22 <action android:name="android.intent.action.MAIN" /> 23 <category android:name="android.intent.category.DEFAULT" /> 24 <category android:name="android.intent.category.LAUNCHER" /> 25 </intent-filter> 26 <intent-filter> 27 <action 28 android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> 29 </intent-filter> 30 <meta-data 31 android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" 32 android:resource="@xml/device_filter" /> 33 20 34 </activity> 35 21 36 </application> 22 37 23 38 </manifest> 39 40 <!-- <manifest xmlns:android="http://schemas.android.com/apk/res/android" --> 41 <!-- package="info.puzzlebox.orbit" --> 42 <!-- android:versionCode="1" --> 43 <!-- android:versionName="1.0" > --> 44 45 <!-- <uses-sdk --> 46 <!-- android:minSdkVersion="15" --> 47 <!-- android:targetSdkVersion="15" /> --> 48 49 <!-- <application --> 50 <!-- android:icon="@drawable/ic_launcher" --> 51 <!-- android:label="@string/app_name" --> 52 <!-- android:theme="@style/AppTheme" > --> 53 <!-- <activity --> 54 <!-- android:name=".MainActivity" --> 55 <!-- android:label="@string/title_activity_main" > --> 56 <!-- <meta-data --> 57 <!-- android:name="android.support.PARENT_ACTIVITY" --> 58 <!-- android:value="android.app.ActivityGroup" /> --> 59 <!-- </activity> --> 60 <!-- </application> --> 61 62 <!-- </manifest> --> -
android/gen/info/puzzlebox/orbit/R.java
r3909100 r1a53973 11 11 public static final class attr { 12 12 } 13 public static final class dimen { 14 public static final int padding_large=0x7f050002; 15 public static final int padding_medium=0x7f050001; 16 public static final int padding_small=0x7f050000; 17 } 13 18 public static final class drawable { 14 19 public static final int ic_action_search=0x7f020000; … … 16 21 } 17 22 public static final class id { 18 public static final int menu_settings=0x7f070000; 23 public static final int button1=0x7f09000c; 24 public static final int button2=0x7f09000d; 25 public static final int menu_settings=0x7f09000e; 26 public static final int progressBarAttention=0x7f090001; 27 public static final int progressBarMeditation=0x7f090004; 28 public static final int progressBarPower=0x7f090009; 29 public static final int progressBarSignal=0x7f090007; 30 public static final int scrollViewDebugConsole=0x7f09000a; 31 public static final int seekBarAttention=0x7f090002; 32 public static final int seekBarMeditation=0x7f090005; 33 public static final int textViewDebugConsole=0x7f09000b; 34 public static final int textViewLabelAttention=0x7f090000; 35 public static final int textViewLabelMeditation=0x7f090003; 36 public static final int textViewLabelPower=0x7f090008; 37 public static final int textViewLabelSignal=0x7f090006; 19 38 } 20 39 public static final class layout { … … 22 41 } 23 42 public static final class menu { 24 public static final int activity_main=0x7f0 60000;43 public static final int activity_main=0x7f080000; 25 44 } 26 45 public static final class string { 27 public static final int app_name=0x7f040000; 28 public static final int hello_world=0x7f040001; 29 public static final int menu_settings=0x7f040002; 30 public static final int title_activity_main=0x7f040003; 46 public static final int app_name=0x7f060001; 47 public static final int button_connect=0x7f060008; 48 public static final int button_demo=0x7f060009; 49 public static final int hello=0x7f060000; 50 public static final int label_attention=0x7f060003; 51 public static final int label_debug_console=0x7f060007; 52 public static final int label_meditation=0x7f060004; 53 public static final int label_power=0x7f060006; 54 public static final int label_signal=0x7f060005; 55 public static final int menu_settings=0x7f060002; 56 public static final int seekbar_from_touch=0x7f06000c; 57 public static final int seekbar_tracking_off=0x7f06000b; 58 public static final int seekbar_tracking_on=0x7f06000a; 31 59 } 32 60 public static final class style { 33 public static final int AppTheme=0x7f050000; 61 /** <style name="AppTheme" parent="android:Theme.Light" /> 62 <style name="AppTheme" parent="android:Theme.Holo.Light" /> 63 <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" /> 64 */ 65 public static final int AppTheme=0x7f070000; 66 } 67 public static final class xml { 68 public static final int device_filter=0x7f040000; 69 public static final int progress_drawable=0x7f040001; 70 public static final int thumb_drawable=0x7f040002; 34 71 } 35 72 } -
android/project.properties
r3909100 r1a53973 12 12 13 13 # Project target. 14 target=android-1 614 target=android-15 -
android/res/XML/device_filter.xml
r60b4520 r1a53973 3 3 <!-- 0x0403 / 0x6001: FTDI FT232R UART --> 4 4 <usb-device vendor-id="1027" product-id="24577" /> 5 5 6 <!-- 0x2341 / 0x0001: Arduino Uno SMD R2 --> 6 <usb-device vendor-id="9025" product-id="1" /> 7 <!-- <usb-device vendor-id="9025" product-id="1" /> --> 8 7 9 <!-- 0x2341 / 0x0043: Arduino Uno R3 --> 8 <usb-device vendor-id="9025" product-id="2b" /> 10 <!-- <usb-device vendor-id="9025" product-id="2b" /> --> 11 12 <!-- 0x2341 / 0x0044: Arduino Mega ADK R3 --> 13 <!-- <usb-device vendor-id="9025" product-id="2c" /> --> 14 9 15 <!-- 0x2341 / 0x****: Arduino (All) --> 10 16 <usb-device vendor-id="9025" /> 17 18 <!-- 0x16C0 / 0x0483: Teensyduino --> 19 <usb-device vendor-id="5824" product-id="1155" /> 20 11 21 </resources> -
android/res/layout/activity_main.xml
r3909100 r1a53973 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" > 1 <?xml version="1.0" encoding="utf-8"?> 2 3 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 4 android:layout_width="fill_parent" 5 android:layout_height="fill_parent" 6 android:orientation="vertical" > 5 7 6 8 <TextView 9 android:id="@+id/textViewLabelAttention" 7 10 android:layout_width="wrap_content" 8 11 android:layout_height="wrap_content" 9 android:layout_centerHorizontal="true" 10 android:layout_centerVertical="true" 11 android:text="@string/hello_world" 12 tools:context=".MainActivity" /> 12 android:text="@string/label_attention" 13 android:textAppearance="?android:attr/textAppearanceLarge" /> 13 14 14 </RelativeLayout> 15 <ProgressBar 16 android:id="@+id/progressBarAttention" 17 style="?android:attr/progressBarStyleHorizontal" 18 android:layout_width="match_parent" 19 android:layout_height="wrap_content" /> 20 21 <SeekBar 22 android:id="@+id/seekBarAttention" 23 android:layout_width="match_parent" 24 android:layout_height="wrap_content" 25 android:max="100" 26 android:progress="72" 27 android:progressDrawable="@xml/progress_drawable" 28 android:thumb="@xml/thumb_drawable" /> 29 30 31 <TextView 32 android:id="@+id/textViewLabelMeditation" 33 android:layout_width="wrap_content" 34 android:layout_height="wrap_content" 35 android:text="@string/label_meditation" 36 android:textAppearance="?android:attr/textAppearanceLarge" /> 37 38 <ProgressBar 39 android:id="@+id/progressBarMeditation" 40 style="?android:attr/progressBarStyleHorizontal" 41 android:layout_width="match_parent" 42 android:layout_height="wrap_content" /> 43 44 45 <SeekBar 46 android:id="@+id/seekBarMeditation" 47 android:layout_width="match_parent" 48 android:layout_height="wrap_content" 49 android:max="100" 50 android:progress="0" 51 android:progressDrawable="@xml/progress_drawable" 52 android:thumb="@xml/thumb_drawable" /> 53 54 <TextView 55 android:id="@+id/textViewLabelSignal" 56 android:layout_width="wrap_content" 57 android:layout_height="wrap_content" 58 android:text="@string/label_signal" 59 android:textAppearance="?android:attr/textAppearanceLarge" /> 60 61 <ProgressBar 62 android:id="@+id/progressBarSignal" 63 style="?android:attr/progressBarStyleHorizontal" 64 android:layout_width="match_parent" 65 android:layout_height="wrap_content" /> 66 67 <TextView 68 android:id="@+id/textViewLabelPower" 69 android:layout_width="wrap_content" 70 android:layout_height="wrap_content" 71 android:text="@string/label_power" 72 android:textAppearance="?android:attr/textAppearanceLarge" /> 73 74 <ProgressBar 75 android:id="@+id/progressBarPower" 76 style="?android:attr/progressBarStyleHorizontal" 77 android:layout_width="match_parent" 78 android:layout_height="wrap_content" /> 79 80 <TextView 81 android:layout_width="fill_parent" 82 android:layout_height="wrap_content" 83 android:text="@string/hello" /> 84 85 <ScrollView android:layout_width="fill_parent" android:id="@+id/scrollViewDebugConsole" android:fadeScrollbars="true" android:scrollbars="vertical" android:layout_height="0dip" android:layout_weight="1.00"> 86 <TextView android:id="@+id/textViewDebugConsole" android:layout_width="fill_parent" android:text="@string/label_debug_console" android:layout_height="fill_parent"></TextView> 87 </ScrollView> 88 89 <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/button1" android:text="@string/button_connect" android:onClick="connectHeadset"></Button> 90 <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/button2" android:text="@string/button_demo" android:onClick="demoMode"></Button> 91 92 </LinearLayout> 93 94 95 <!-- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" --> 96 <!-- xmlns:tools="http://schemas.android.com/tools" --> 97 <!-- android:layout_width="match_parent" --> 98 <!-- android:layout_height="match_parent" > --> 99 100 <!-- <TextView --> 101 <!-- android:layout_width="wrap_content" --> 102 <!-- android:layout_height="wrap_content" --> 103 <!-- android:layout_centerHorizontal="true" --> 104 <!-- android:layout_centerVertical="true" --> 105 <!-- android:text="@string/hello_world" --> 106 <!-- tools:context=".MainActivity" /> --> 107 108 <!-- </RelativeLayout> --> -
android/res/values-v11/styles.xml
r3909100 r1a53973 1 1 <resources> 2 2 3 <style name="AppTheme" parent="android:Theme.Holo.Light" /> 4 3 <!-- <style name="AppTheme" parent="android:Theme.Holo.Light" /> --> 4 <style name="AppTheme" parent="android:Theme.Black" /> 5 5 6 </resources> -
android/res/values-v14/styles.xml
r3909100 r1a53973 1 1 <resources> 2 2 3 <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" /> 4 3 <!-- <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" /> --> 4 <style name="AppTheme" parent="android:Theme.Black" /> 5 5 6 </resources> -
android/res/values/strings.xml
r3909100 r1a53973 1 <?xml version="1.0" encoding="utf-8"?> 1 2 <resources> 3 <string name="hello">Puzzlebox Orbit</string> 4 <string name="app_name">Orbit</string> 5 <string name="menu_settings">Settings</string> 6 <string name="label_attention">Attention</string> 7 <string name="label_meditation">Meditation</string> 8 <string name="label_signal">Signal</string> 9 <string name="label_power">Hover</string> 10 <string name="label_debug_console">Debug Console</string> 11 <string name="button_connect">Connect</string> 12 <string name="button_demo">Demo</string> 13 <string name="seekbar_tracking_on">Tracking on</string> 14 <string name="seekbar_tracking_off">Tracking off</string> 15 <string name="seekbar_from_touch">from touch</string> 16 </resources> 2 17 3 <string name="app_name">Puzzlebox Orbit</string> 4 <string name="hello_world">Hello world!</string> 5 <string name="menu_settings">Settings</string> 6 <string name="title_activity_main">MainActivity</string> 18 <!-- <resources> --> 7 19 8 </resources> 20 <!-- <string name="app_name">Puzzlebox Orbit</string> --> 21 <!-- <string name="hello_world">Hello world!</string> --> 22 <!-- <string name="menu_settings">Settings</string> --> 23 <!-- <string name="title_activity_main">MainActivity</string> --> 24 25 <!-- </resources> --> -
android/res/values/styles.xml
r3909100 r1a53973 1 1 <resources> 2 2 3 <style name="AppTheme" parent="android:Theme.Light" /> 4 3 <!-- <style name="AppTheme" parent="android:Theme.Light" /> --> 4 <style name="AppTheme" parent="android:Theme.Black" /> 5 5 6 </resources> -
android/src/info/puzzlebox/orbit/MainActivity.java
r41c4762 r1a53973 533 533 } 534 534 535 command = "hover"; 535 // command = "hover"; 536 command = "idle"; 536 537 appendTextAndScroll("Command for serial device: " + command + "\n"); 537 538 serial.setCommand(command); -
android/src/info/puzzlebox/orbit/SerialDevice.java
r41c4762 r1a53973 30 30 31 31 String commandNeutral = "x000"; 32 //String commandHover = "x085";33 String command Hover = "x085\r";32 String commandHover = "x085"; 33 String commandIdle = "x030"; 34 34 String commandMaximumThrust = "x100"; 35 35 … … 39 39 String response = ""; 40 40 // byte[] setting = commandNeutral; 41 //String setting = commandNeutral;42 String setting = commandHover;41 String setting = commandNeutral; 42 // String setting = commandHover; 43 43 44 44 while (keep_running) { … … 46 46 if (command == "neutral") { 47 47 setting = commandNeutral; 48 } else if (command == "idle") { 49 setting = commandIdle; 48 50 } else if (command == "hover") { 49 51 setting = commandHover;
Note: See TracChangeset
for help on using the changeset viewer.