Changeset ebf23f0 in orbit


Ignore:
Timestamp:
12/27/13 04:18:05 (6 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master, Servo
Children:
71f66b0
Parents:
4e6333d
Message:
  • Scoring mechanism re-balanced
  • Don't display device warning messages more than twice
Location:
android/src/info/puzzlebox/orbit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • android/src/info/puzzlebox/orbit/FragmentTabAdvanced.java

    rb7a3163 rebf23f0  
    986986                        if (! checkBoxInvertControlSignal.isChecked()) 
    987987                                checkBoxInvertControlSignal.performClick(); 
    988                         Toast.makeText(((OrbitTabActivity)getActivity()),  
    989                                         "Warning: HTC Droid DNA detected, which has known compatability issues with infrared transmitter. Contact Support for more information.", Toast.LENGTH_LONG).show(); 
     988 
     989                        // Display a warning pop-up about this device, but not more than twice 
     990                        if (((OrbitTabActivity)getActivity()).deviceWarningMessagesDisplayed < 2) { 
     991                                Toast.makeText(((OrbitTabActivity)getActivity()),  
     992                                                "Warning: HTC Droid DNA detected, which has known compatability issues with infrared transmitter. Contact Support for more information.", Toast.LENGTH_LONG).show(); 
     993                                ((OrbitTabActivity)getActivity()).deviceWarningMessagesDisplayed =  
     994                                                ((OrbitTabActivity)getActivity()).deviceWarningMessagesDisplayed + 1; 
     995                        } 
    990996                }  
    991997 
     
    9961002                        if (! checkBoxInvertControlSignal.isChecked()) 
    9971003                                checkBoxInvertControlSignal.performClick(); 
    998                         Toast.makeText(((OrbitTabActivity)getActivity()),  
    999                                         "Warning: HTC One detected, which has known compatability issues with infrared transmitter. Contact Support for more information.", Toast.LENGTH_LONG).show(); 
     1004 
     1005                        // Display a warning pop-up about this device, but not more than twice 
     1006                        if (((OrbitTabActivity)getActivity()).deviceWarningMessagesDisplayed < 2) { 
     1007                                Toast.makeText(((OrbitTabActivity)getActivity()),  
     1008                                                "Warning: HTC One detected, which has known compatability issues with infrared transmitter. Contact Support for more information.", Toast.LENGTH_LONG).show(); 
     1009                                ((OrbitTabActivity)getActivity()).deviceWarningMessagesDisplayed =  
     1010                                                ((OrbitTabActivity)getActivity()).deviceWarningMessagesDisplayed + 1; 
     1011                        } 
    10001012                }  
    10011013 
  • android/src/info/puzzlebox/orbit/FragmentTabFlightThinkGear.java

    r005b954 rebf23f0  
    10041004 
    10051005        public void updateScore() { 
     1006                 
     1007                /** 
     1008                 * Score points based on target slider levels 
     1009                 * If you pass your goal with either Attention or Mediation 
     1010                 * the higher target of the two will counts as points per second. 
     1011                 *  
     1012                 * Minimum threshold for points is set as "minimumScoreTarget" 
     1013                 *  
     1014                 * For example, assume minimumScoreTarget is 40%. 
     1015                 * If your target Attention is 60% and you go past to reach 80% 
     1016                 * you will receive 20 points per second (60-40). If your  
     1017                 * target is 80% and you reach 80% you will receive 40  
     1018                 * points per second (80-40). 
     1019                 *  
     1020                 * You can set both Attention and Meditation targets at the 
     1021                 * same time. Reaching either will fly the helicopter but you 
     1022                 * will only receive points for the higher-scoring target of 
     1023                 * the two. 
     1024                 *  
     1025                 */ 
    10061026 
    10071027                int eegAttentionScore = 0; 
     
    10151035                if ((eegAttention >= eegAttentionTarget) && 
    10161036                                (eegAttentionTarget > minimumScoreTarget)) 
    1017                         eegAttentionScore = eegAttention; 
     1037                        eegAttentionScore = eegAttentionTarget - minimumScoreTarget; 
    10181038 
    10191039                if ((eegMeditation >= eegMeditationTarget) && 
    10201040                                (eegMeditationTarget > minimumScoreTarget)) 
    1021                         eegMeditationScore = eegMeditation; 
     1041                        eegMeditationScore = eegMeditationTarget - minimumScoreTarget; 
    10221042 
    10231043                if (eegAttentionScore > eegMeditationScore) 
  • android/src/info/puzzlebox/orbit/OrbitTabActivity.java

    rb7a3163 rebf23f0  
    7878        boolean invertControlSignal = false; 
    7979        boolean tiltSensorControl = false; 
     80        int deviceWarningMessagesDisplayed = 0; 
    8081 
    8182 
Note: See TracChangeset for help on using the changeset viewer.