Changeset b7a3163 in orbit


Ignore:
Timestamp:
12/25/13 17:43:40 (6 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master, Servo
Children:
4e6333d
Parents:
005b954
Message:
  • Controlled Descent listed as "Experimental"
  • version set to 1.4.8
Location:
android
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • android/AndroidManifest.xml

    rde61e47 rb7a3163  
    33    package="info.puzzlebox.orbit" 
    44    android:versionCode="9" 
    5     android:versionName="1.5.0" > 
     5    android:versionName="1.4.8" > 
    66 
    77    <uses-sdk 
  • android/res/values/strings.xml

    rde61e47 rb7a3163  
    5858    <string name="checkbox_tilt_sensor_control_throttle">Adjust Throttle Only</string> 
    5959    <string name="checkbox_tilt_sensor_control_throttle_small">Throttle Only</string> 
    60     <string name="checkbox_controlled_descent">Controlled Descent</string> 
     60    <string name="checkbox_controlled_descent">Controlled Descent (Experimental)</string> 
    6161    <string name="textview_label_score">Current Score: </string> 
    6262    <string name="textview_score">0</string> 
  • android/src/info/puzzlebox/orbit/FragmentTabAdvanced.java

    r005b954 rb7a3163  
    9191        ProgressBar progressBarPower; 
    9292 
    93          
     93 
    9494        SeekBar seekBarThrottle; 
    9595        SeekBar seekBarYaw; 
     
    186186                config = getResources().getConfiguration(); 
    187187 
    188 //              checkBoxAdvancedOptions = (CheckBox) v.findViewById(R.id.checkBoxAdvancedOptions); 
    189                  
     188                //              checkBoxAdvancedOptions = (CheckBox) v.findViewById(R.id.checkBoxAdvancedOptions); 
     189 
    190190                progressBarAttention = (ProgressBar) v.findViewById(R.id.progressBarAttention); 
    191191                final float[] roundedCorners = new float[] { 5, 5, 5, 5, 5, 5, 5, 5 }; 
     
    662662        public void checkBoxControlledDescentClicked(View v) { 
    663663 
    664                 // pass 
     664                // If Controlled Descent checkBox is unchecked during an 
     665                // active controlled descent, abort descent and reset throttle 
     666                if ((! checkBoxControlledDescent.isChecked()) && 
     667                                (orbitControlledDescentTask != null) &&  
     668                                (orbitControlledDescentTask.keepDescending)) { 
     669                        orbitControlledDescentTask.callStopAudio = false; 
     670                        orbitControlledDescentTask.keepDescending = false; 
     671                } 
    665672 
    666673 
     
    901908        public void registerControlledDescent() { 
    902909 
     910                // Abort if a controlled descent task is in progress or 
     911                // has already been called at least once in this cycle 
     912                if ((orbitControlledDescentTask != null) && 
     913                                orbitControlledDescentTask.descentActivated) 
     914                        return; 
     915 
    903916                orbitControlledDescentTask = new OrbitControlledDescentTask(); 
    904917                orbitControlledDescentTask.execute(); 
     
    976989                                        "Warning: HTC Droid DNA detected, which has known compatability issues with infrared transmitter. Contact Support for more information.", Toast.LENGTH_LONG).show(); 
    977990                }  
    978                  
     991 
    979992                // HTC One 
    980993                else if ((deviceManufacturer.contains("HTC")) && 
     
    986999                                        "Warning: HTC One detected, which has known compatability issues with infrared transmitter. Contact Support for more information.", Toast.LENGTH_LONG).show(); 
    9871000                }  
    988                  
    989                  
     1001 
     1002 
    9901003                else { 
    9911004                        Log.v(TAG, "No custom device settings found."); 
     
    10151028                public boolean keepDescending = true; 
    10161029                public boolean callStopAudio = true; 
     1030                public boolean descentActivated = false; 
    10171031 
    10181032                protected Integer doInBackground(Integer... params) { 
     
    10291043                        double throttleNew = throttlePrevious; 
    10301044                        boolean stepAccelerated = false; 
     1045                        descentActivated = true; 
    10311046 
    10321047                        while ((keepDescending) &&  
    10331048                                        (fragmentAdvanced.seekBarThrottle.getProgress() > throttleTarget) && 
    1034                                         (! fragmentAdvanced.checkBoxTiltSensorControlThrottle.isChecked())) { 
     1049                                        (! fragmentAdvanced.checkBoxTiltSensorControlThrottle.isChecked()) && 
     1050                                        (fragmentAdvanced.checkBoxControlledDescent.isChecked())) { 
    10351051 
    10361052                                // Increase steps after time as the Orbit falls quickly at lower power levels 
     
    10671083                        Log.d(TAG, "onPostExecute()"); 
    10681084 
    1069                         fragmentAdvanced.unregisterControlledDescent(callStopAudio); 
    1070  
    10711085                        if (resetThrottleToPrevious) 
    10721086                                fragmentAdvanced.seekBarThrottle.setProgress(throttlePrevious); 
    10731087 
     1088                        fragmentAdvanced.unregisterControlledDescent(callStopAudio); 
     1089 
     1090                        descentActivated = false; 
     1091 
     1092 
    10741093                } // onPostExecute 
    10751094 
  • android/src/info/puzzlebox/orbit/OrbitTabActivity.java

    r005b954 rb7a3163  
    818818                        // Handle controlled descent thread if activated 
    819819                        if ((fragmentAdvanced.orbitControlledDescentTask != null) &&  
    820                                         (! fragmentAdvanced.orbitControlledDescentTask.keepDescending)) { 
     820                                        (fragmentAdvanced.orbitControlledDescentTask.keepDescending)) { 
    821821                                fragmentAdvanced.orbitControlledDescentTask.callStopAudio = false; 
    822822                                fragmentAdvanced.orbitControlledDescentTask.keepDescending = false; 
     
    884884 
    885885                if ((generateAudio) && 
     886                                (currentCommand != "neutral") && 
    886887                                (fragmentAdvanced != null) && 
    887888                                (fragmentAdvanced.checkBoxControlledDescent.isChecked()) && 
Note: See TracChangeset for help on using the changeset viewer.