Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/AndroidProjectSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/deviceManager.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/studiobot.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified app/release/app-release.apk
Binary file not shown.
Binary file modified app/release/baselineProfiles/0/app-release.dm
Binary file not shown.
Binary file modified app/release/baselineProfiles/1/app-release.dm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,6 @@ public int searchArrCol(ArrayList<Object[]> arr, int col, Object obj){
}

public String getData(Spinner choice) {
return choice.toString();
return choice.getSelectedItem().toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ protected void onCreate(Bundle savedInstanceState) {
return insets;
});

RadioGroup positionGroup1 = findViewById(R.id.staring_position_radio_group1);
RadioButton position1Button = findViewById(R.id.Position_1);
RadioButton position2Button = findViewById(R.id.Position_2);
RadioButton position3Button = findViewById(R.id.Position_3);
Spinner positionChoice = findViewById(R.id.position_spinner);
ArrayAdapter<CharSequence> posAdapter = ArrayAdapter.createFromResource(
this,
R.array.position_array,
android.R.layout.simple_spinner_item);
posAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
positionChoice.setAdapter(posAdapter);

Button FS1plus = findViewById(R.id.up_count_button_fs1);
Button FS5plus = findViewById(R.id.up_count_button_fs5);
Expand Down Expand Up @@ -91,7 +94,7 @@ protected void onCreate(Bundle savedInstanceState) {
EditText FSField = findViewById(R.id.edit_text_fs);
EditText FPField = findViewById(R.id.edit_text_fp);

Spinner accuracyChoice = (Spinner) findViewById(R.id.accuracy_spinner);
Spinner accuracyChoice = findViewById(R.id.accuracy_spinner);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
this,
R.array.accuracy_estimate,
Expand All @@ -114,17 +117,6 @@ protected void onCreate(Bundle savedInstanceState) {
// #processor attempted | #processor scored |#algae removed ||
String position = u.untilNextComma(autoSaveString);
// Log.d(position, position);
switch (position){
case "Position 1":
position1Button.toggle();
break;
case "Position 2":
position2Button.toggle();
break;
case "Position 3":
position3Button.toggle();
break;
}
FSField.setText(u.untilNextComma(autoSaveString));
autoSaveString = u.nextCommaOn(autoSaveString);
}
Expand Down Expand Up @@ -154,12 +146,9 @@ protected void onCreate(Bundle savedInstanceState) {
// Can be simplified. Not now.

backButton.setOnClickListener((l)-> {
// Starting Position | Left starting Position | #ACL1 | #ACL2 | #ACL3 | #ACL4 |
// #SCL1 | #SCL2 | #SCL3 | #SCL4 | #Barge attempted | #barge scored |
// #processor attempted | #processor scored |#algae removed ||
String autoInfo = "";
autoInfo += ","; // Starting position # end
autoInfo += u.getData(positionGroup1);
autoInfo += u.getData(positionChoice);

autoInfo += u.getData(FSField);
autoInfo += u.getData(accuracyChoice);
Expand All @@ -179,15 +168,10 @@ protected void onCreate(Bundle savedInstanceState) {
saveButton.setOnClickListener((l)-> {
String response = "";


if((u.getData(positionGroup1).isEmpty()))
response = "Please fill position";
else{

String autoInfo = "";
autoInfo += ","; // Starting position # end

autoInfo += u.getData(positionGroup1) + ",";
autoInfo += u.getData(positionChoice) + ",";

autoInfo += u.getData(FSField) + ",";
autoInfo += u.getData(accuracyChoice) + ",";
Expand All @@ -203,7 +187,7 @@ protected void onCreate(Bundle savedInstanceState) {
i.putExtra("postMatch", postMatchSaveString);

this.startActivity(i);
}


if(!response.isEmpty()){
unfilledMessage.setText(response);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Spinner;
import android.widget.Toast;

Expand Down Expand Up @@ -87,25 +84,29 @@ protected void onCreate(Bundle savedInstanceState) {
Button FP15minus = findViewById(R.id.down_count_button_fp15);
Button FP20minus = findViewById(R.id.down_count_button_fp20);

RadioGroup parkRadioGroup = findViewById(R.id.endgame_location); // Endgame RadioGroup
RadioButton level1Button = findViewById(R.id.level1_climb);
RadioButton level2Button = findViewById(R.id.level2_climb);
RadioButton level3Button = findViewById(R.id.level3_climb);

RadioGroup accuracyRadioGroup = findViewById(R.id.accuracy_position); // Endgame RadioGroup
RadioButton pacManButton = findViewById(R.id.pac_manning);
RadioButton standStillButton = findViewById(R.id.stand_still);
RadioButton noDifferenceButton = findViewById(R.id.no_difference);
RadioButton badAccuracyButton = findViewById(R.id.bad_accuracy);

RadioButton noneButton = findViewById(R.id.nothing);
RadioGroup endgameTimeGroup = findViewById(R.id.endgame_time);
RadioButton twentyFiveButton = findViewById(R.id.twenty_five);
RadioButton twentyButton = findViewById(R.id.twenty);
RadioButton fifteenButton = findViewById(R.id.fifteen);
RadioButton tenButton = findViewById(R.id.ten);
RadioButton fiveButton = findViewById(R.id.five);
RadioButton zeroButton = findViewById(R.id.zero);
Spinner climbStatus = findViewById(R.id.climbStatus);
ArrayAdapter<CharSequence> climbAdapter = ArrayAdapter.createFromResource(
this,
R.array.climb_status_dropdown,
android.R.layout.simple_spinner_item);
climbAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
climbStatus.setAdapter(climbAdapter);

Spinner accuracyPosition = findViewById(R.id.accuracy_position);
ArrayAdapter<CharSequence> accPosAdapter = ArrayAdapter.createFromResource(
this,
R.array.accuracy_position,
android.R.layout.simple_spinner_item);
accPosAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
accuracyPosition.setAdapter(accPosAdapter);

Spinner climbTime = findViewById(R.id.endgameTime);
ArrayAdapter<CharSequence> climbTimeAdapter = ArrayAdapter.createFromResource(
this,
R.array.time_to_hang,
android.R.layout.simple_spinner_item);
climbTimeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
climbTime.setAdapter(climbTimeAdapter);

Toast unfilledMessage = new Toast(this);
unfilledMessage.setDuration(Toast.LENGTH_SHORT);
Expand All @@ -120,64 +121,6 @@ protected void onCreate(Bundle savedInstanceState) {
FPField.setText(u.untilNextComma(teleOpSaveString));
teleOpSaveString = u.nextCommaOn(teleOpSaveString);

String currentButton = u.untilNextComma(teleOpSaveString);
switch(currentButton){
case "Level 1":
level1Button.toggle();
break;
case "Level 2":
level2Button.toggle();
break;
case "Level 3":
level3Button.toggle();
break;
case "None":
noneButton.toggle();
break;
}
teleOpSaveString = u.nextCommaOn(teleOpSaveString);

String timeToHang = u.untilNextComma(teleOpSaveString);
switch(timeToHang){
case "25":
twentyFiveButton.toggle();
break;
case "20":
twentyButton.toggle();
break;
case "15":
fifteenButton.toggle();
break;
case "10":
tenButton.toggle();
break;
case "5":
fiveButton.toggle();
break;
case "0":
zeroButton.toggle();
break;
}

String accuracyPosition = u.untilNextComma(teleOpSaveString);
switch(accuracyPosition){
case "When moving":
pacManButton.toggle();
break;
case "When unmoving":
standStillButton.toggle();
break;
case "About the same":
noDifferenceButton.toggle();
break;
case "Consistently bad accuracy":
badAccuracyButton.toggle();
break;
}


teleOpSaveString = u.nextCommaOn(teleOpSaveString);

}

// Setting increment and decrement listeners for all buttons
Expand Down Expand Up @@ -216,9 +159,9 @@ protected void onCreate(Bundle savedInstanceState) {

teleOpInfo += u.getData(FPField) + ",";

teleOpInfo += u.getData(parkRadioGroup) + ",";
teleOpInfo += u.getData(endgameTimeGroup) + ",";
teleOpInfo += u.getData(accuracyRadioGroup) + ",";
teleOpInfo += u.getData(climbStatus) + ",";
teleOpInfo += u.getData(accuracyPosition) + ",";
teleOpInfo += u.getData(climbTime) + ",";

Intent i = new Intent(this, activityAutonomous.class);
i.putExtra("preMatch", preMatchSaveString);
Expand All @@ -235,10 +178,6 @@ protected void onCreate(Bundle savedInstanceState) {
FSField.setText("0");
if(u.getData(FPField).isEmpty())
FPField.setText("0");
if(u.getData(parkRadioGroup).isEmpty())
response = "Please select an endgame position";
else if(u.getData(endgameTimeGroup).isEmpty())
response = "Please select park time";
else{
String teleOpInfo = "";

Expand All @@ -247,9 +186,9 @@ else if(u.getData(endgameTimeGroup).isEmpty())

teleOpInfo += u.getData(FPField) + ",";

teleOpInfo += u.getData(parkRadioGroup) + ",";
teleOpInfo += u.getData(endgameTimeGroup) + ",";
teleOpInfo += u.getData(accuracyRadioGroup) + ",";
teleOpInfo += u.getData(climbStatus) + ",";
teleOpInfo += u.getData(accuracyPosition) + ",";
teleOpInfo += u.getData(climbTime) + ",";

Intent i = new Intent(this, activityAfterMatch.class);
i.putExtra("preMatch", preMatchSaveString);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_after_match.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
android:id="@+id/why_robot_stopped"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"

android:orientation="vertical"
android:showDividers="middle" >

Expand Down Expand Up @@ -166,7 +166,7 @@
<RadioButton
android:id="@+id/e_stopped"
android:layout_width="wrap_content"
android:layout_height="77dp"
android:layout_height="match_parent"
android:text="@string/e_stopped"
android:textSize="20sp" />
<RadioButton
Expand Down
33 changes: 4 additions & 29 deletions app/src/main/res/layout/activity_autonomous.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,10 @@
android:textSize="16sp"
android:textColor="@color/black"/>

<RadioGroup
android:id="@+id/staring_position_radio_group1"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:divider="@drawable/vertical_padding_small"
android:showDividers="middle">

<RadioButton
android:id="@+id/Position_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/position1" />

<RadioButton
android:id="@+id/Position_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/position2" />

<RadioButton
android:id="@+id/Position_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/position3" />

</RadioGroup>
<Spinner
android:id="@+id/position_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<!-- left starting position button -->
Expand Down Expand Up @@ -133,7 +109,6 @@
android:id="@+id/accuracy_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>

<LinearLayout
Expand Down
Loading