Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 76a1b1ff70 | |||
| 82465f213f | |||
| 3c7a879f51 | |||
| 3157de62ff | |||
| 5ddc032be9 | |||
| e6073ded49 | |||
| 7503cefa09 | |||
| 3b4737e6bc | |||
| 76d28e46cd | |||
| 73308f2acc | |||
| c18a93cb1a |
@@ -11,10 +11,10 @@
|
||||
|
||||
#### Here is an overview of the main features currently included in the app:
|
||||
- This project is written for Android! No need for some kind of janky laptop charging setup.
|
||||
- Similar to ScoutingPASS, there are many diffrent types of fields that can be used to collect data.
|
||||
- The app is designed to handle updates to the fields on the fly, without loosing any data!
|
||||
- Similar to ScoutingPASS, many different types of fields can be used to collect data.
|
||||
- The app is designed to handle updates to the fields on the fly, without losing any data!
|
||||
- Unlike other scouting solutions, scouters can disable any field they did not measure, and disabled fields will not be included in any calculations.
|
||||
- Dynamic displays based off of the diffrent fields.
|
||||
- Dynamic displays based on the different fields.
|
||||
- Data transfer including 2D codes, Bluetooth, and File Bundle.
|
||||
- Exporting using CSV.
|
||||
- Deployment on F-Droid
|
||||
@@ -22,14 +22,13 @@
|
||||
|
||||
#### Things that are yet to be implemented:
|
||||
- A page that lets users cross-compare scouting data between teams. (Compare)
|
||||
- A page that lets scouters more easily make reports to the drive team before a match starts (Report)
|
||||
|
||||
#### Things that may or may not be implemented:
|
||||
- Statbotics intgration
|
||||
- Statbotics integration
|
||||
- Scout error estimation using OPR-like calculation
|
||||
- - Would most likely require Statbotics
|
||||
https://www.thebluealliance.com/avatars
|
||||
### Screenshots
|
||||
|Match scouting interface|Field editor|Teams data viewer|
|
||||
|-|-|-|
|
||||
||||
|
||||
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ android {
|
||||
dependenciesInfo {
|
||||
// Disables dependency metadata when building APKs.
|
||||
includeInApk = false
|
||||
// Disables dependency metadata when building Android App Bundles.
|
||||
// Disables dependency metadata when building Android App Bundles.5
|
||||
includeInBundle = false
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ android {
|
||||
applicationId = "com.ridgebotics.ridgescout"
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
versionCode = 11 // **IMPORTANT** Increment this before releasing on github
|
||||
versionName = "1.4"// **IMPORTANT** Change this before releasing on github (<Year num since 2024>.<Update Version>)
|
||||
versionCode = 15 // **IMPORTANT** Increment this before releasing on github
|
||||
versionName = "3.1"// **IMPORTANT** Change this before releasing on github (<Year num since 2024>.<Update Version>)
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -47,11 +47,13 @@ public class MainActivity extends AppCompatActivity {
|
||||
// Load default match fields
|
||||
if(!FileEditor.fileExist(Fields.matchFieldsFilename)){
|
||||
Fields.save(Fields.matchFieldsFilename, Fields.default_match_fields);
|
||||
FileEditor.toTheArchaicPeriod(Fields.matchFieldsFilename);
|
||||
}
|
||||
|
||||
// Load default pit fields
|
||||
if(!FileEditor.fileExist(Fields.pitsFieldsFilename)){
|
||||
Fields.save(Fields.pitsFieldsFilename, Fields.default_pit_fields);
|
||||
FileEditor.toTheArchaicPeriod(Fields.pitsFieldsFilename);
|
||||
}
|
||||
|
||||
// get time zone for FTP file transfer
|
||||
|
||||
@@ -30,36 +30,7 @@ public class Fields {
|
||||
|
||||
public static final FieldType[][] default_match_fields = new FieldType[][] {
|
||||
{
|
||||
new FieldposType(uuid(),"Auto start pos", "Where does the robot start its auto?", new int[]{0,0}),
|
||||
|
||||
new TallyType(uuid(),"Auto L4 Coral", "How many coral did this robot score in L4 during auto?", 0),
|
||||
new TallyType(uuid(),"Auto L3 Coral", "How many coral did this robot score in L3 during auto?", 0),
|
||||
new TallyType(uuid(),"Auto L2 Coral", "How many coral did this robot score in L2 during auto?", 0),
|
||||
new TallyType(uuid(),"Auto L1/Trough Coral", "How many coral did this robot score in L1 during auto?", 0),
|
||||
new TallyType(uuid(),"Auto Processor Algae", "How many algae did this robot score in the Barge during auto?", 0),
|
||||
new TallyType(uuid(),"Auto Barge Algae", "How many algae did this robot score in the Barge during auto?", 0),
|
||||
|
||||
new DropdownType(uuid(),"Auto Quality", "How did the robot drive during auto?", new String[]{"Smooth", "Jittery"}, 0),
|
||||
new TextType(uuid(),"Auto Comments", "Anything interesting about auto", ""),
|
||||
|
||||
new TallyType(uuid(),"Teleop L4 Coral", "How many coral did this robot score in L4 during auto?", 0),
|
||||
new TallyType(uuid(),"Teleop L3 Coral", "How many coral did this robot score in L3 during auto?", 0),
|
||||
new TallyType(uuid(),"Teleop L2 Coral", "How many coral did this robot score in L2 during auto?", 0),
|
||||
new TallyType(uuid(),"Teleop L1 Coral", "How many coral did this robot score in L1 during auto?", 0),
|
||||
new TallyType(uuid(),"Teleop Processor Algae", "How many algae did this robot score in the Barge during auto?", 0),
|
||||
new TallyType(uuid(),"Teleop Barge Algae", "How many algae did this robot score in the Barge during auto?", 0),
|
||||
|
||||
new CheckboxType(uuid(),"Upper Algae Removal", "Did the robot remove upper Algae?", 0),
|
||||
new CheckboxType(uuid(),"Lower Algae Removal", "Did the robot remove lower Algae?", 0),
|
||||
|
||||
new DropdownType(uuid(),"Teleop Quality", "How did the robot drive during Teleop?", new String[]{"Smooth", "Jittery"}, 0),
|
||||
new TextType(uuid(),"Teleop Comments", "Anything interesting about Teleop", ""),
|
||||
|
||||
new DropdownType(uuid(),"Climb State", "What was the final condition of the robot?", new String[]{"Nothing", "Continued Cycling", "Park", "Attempted Shallow", "Shallow", "Attempted Deep", "Deep"}, 0),
|
||||
|
||||
new DropdownType(uuid(),"Robot Condition", "Was anything broken?", new String[]{"Everything was working", "Something was maybe broken", "Something was broken", "Robot was disabled for part of the match", "Missing robot"}, 0),
|
||||
|
||||
new TextType(uuid(),"Other Comments", "Any other comments you have", "")
|
||||
new FieldposType(uuid(),"Auto start pos", "Where does the robot start its auto?", new int[]{0,0})
|
||||
}
|
||||
};
|
||||
|
||||
@@ -69,14 +40,6 @@ public class Fields {
|
||||
new DropdownType(uuid(),"Intake type", "What type of intake does this team have?", new String[]{"Ground only", "Player Station only", "Both", "Other, Info in comments"}, 0),
|
||||
new DropdownType(uuid(),"Intake Consistency", "How consistent is the robot at intakeing?", new String[]{"Does not work", "Worked a few times during testing", "Works most of the time", "Fails sometimes", "Never fails"}, 0),
|
||||
|
||||
new DropdownType(uuid(),"Score Area", "What does this robot score?", new String[]{"Only Algae", "Mostly Algae", "Both", "Mostly Coral", "Only Coral"}, 0),
|
||||
|
||||
new CheckboxType(uuid(),"L4 Scoring", "Will the robot score in Layer 4?", 0),
|
||||
new CheckboxType(uuid(),"L3 Scoring", "Will the robot score in Layer 3?", 0),
|
||||
new CheckboxType(uuid(),"L2 Scoring", "Will the robot score in Layer 3?", 0),
|
||||
new CheckboxType(uuid(),"L1/Trough Scoring", "Will the robot score in Layer 1?", 0),
|
||||
new CheckboxType(uuid(),"Processor Scoring", "Will the robot score in the Processor?", 0),
|
||||
new CheckboxType(uuid(),"Barge Scoring", "Will the robot score algae in the Barge?", 0),
|
||||
new DropdownType(uuid(),"Scoring Consistency", "How consistent is the robot at Scoring?", new String[]{"Does not work", "Worked a few times during testing", "Works most of the time", "Fails sometimes", "Never fails"}, 0),
|
||||
|
||||
new TextType(uuid(),"Auto Capability", "What autos does this team have?", ""),
|
||||
|
||||
@@ -112,7 +112,7 @@ public class DropdownType extends FieldType {
|
||||
.layout_match_wrap()
|
||||
.padding(20)
|
||||
.size(18)
|
||||
.align_center()
|
||||
.align_left()
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public class NumberType extends FieldType {
|
||||
if(data.isNull()) return;
|
||||
parent.addView(new TextViewBuilder(parent.getContext(), String.valueOf((int) data.get()))
|
||||
.layout_match_wrap()
|
||||
.align_center()
|
||||
.align_left()
|
||||
.size(24)
|
||||
.build());
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class TallyType extends FieldType {
|
||||
if(data.isNull()) return;
|
||||
parent.addView(new TextViewBuilder(parent.getContext(), String.valueOf((int) data.get()))
|
||||
.layout_match_wrap()
|
||||
.align_center()
|
||||
.align_left()
|
||||
.size(24)
|
||||
.build());
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public class TextType extends FieldType {
|
||||
if(data.isNull()) return;
|
||||
parent.addView(new TextViewBuilder(parent.getContext(), (String) data.get())
|
||||
.layout_match_wrap()
|
||||
.align_center()
|
||||
.align_left()
|
||||
.size(18)
|
||||
.build());
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import static com.ridgebotics.ridgescout.utility.DataManager.pit_transferValues;
|
||||
import static com.ridgebotics.ridgescout.utility.DataManager.pit_values;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Paint;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
@@ -221,19 +222,18 @@ public class TeamsFragment extends Fragment {
|
||||
ScoutingDataWriter.ParsedScoutingDataResult psda = ScoutingDataWriter.load(files[matchIndex], match_values, match_transferValues);
|
||||
|
||||
|
||||
binding.matchArea.addView(
|
||||
new TextViewBuilder(getContext(), "M" + (match_num) + " " + split[2] + "-" + split[3] + " by " + psda.username)
|
||||
.align_center()
|
||||
.size(30)
|
||||
.padding(0,0,40,5)
|
||||
.build()
|
||||
|
||||
);
|
||||
|
||||
TextView title = new TextViewBuilder(getContext(),
|
||||
"M" + (match_num) + " " + split[2] + "-" + split[3] + " by " + psda.username)
|
||||
.align_center()
|
||||
.size(30)
|
||||
.padding(0, 0, 40, 5)
|
||||
.build();
|
||||
title.setPaintFlags(title.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||
binding.matchArea.addView(title);
|
||||
|
||||
for (int i = 0; i < psda.data.array.length; i++) {
|
||||
TextViewBuilder tv = new TextViewBuilder(getContext(), match_latest_values[i].name)
|
||||
.align_center()
|
||||
.align_left()
|
||||
.size(25);
|
||||
|
||||
if (psda.data.array[i].isNull()) {
|
||||
@@ -282,6 +282,7 @@ public class TeamsFragment extends Fragment {
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
if(data[i] != null)
|
||||
match_latest_values[i].add_compiled_view(binding.matchArea, data[i]);
|
||||
}
|
||||
@@ -307,13 +308,13 @@ public class TeamsFragment extends Fragment {
|
||||
|
||||
for(int i = 0; i < match_latest_values.length; i++){
|
||||
|
||||
binding.matchArea.addView(
|
||||
new TextViewBuilder(getContext(), match_latest_values[i].name)
|
||||
TextView tv = new TextViewBuilder(getContext(), match_latest_values[i].name)
|
||||
.align_center()
|
||||
.size(30)
|
||||
.padding(0,0,20,5)
|
||||
.build()
|
||||
);
|
||||
.build();
|
||||
tv.setPaintFlags(tv.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||
binding.matchArea.addView(tv);
|
||||
|
||||
if(data[i] != null)
|
||||
match_latest_values[i].add_history_view(binding.matchArea, data[i]);
|
||||
|
||||
@@ -157,28 +157,35 @@ public class ScoutingFragment extends Fragment {
|
||||
private void updateDashboard() {
|
||||
binding.textName.setText("Welcome, " + SettingsManager.getUsername() + "!");
|
||||
|
||||
int curMatchNum = SettingsManager.getMatchNum();
|
||||
int nextMatch;
|
||||
int teamNum = SettingsManager.getTeamNum();
|
||||
try {
|
||||
nextMatch = event.getNextTeamMatch(teamNum, curMatchNum).matchIndex;
|
||||
} catch (Exception e){
|
||||
AlertManager.error("Sorry, in event ("+evcode+"), your team number ("+teamNum+") wasn't found!", e);
|
||||
return;
|
||||
}
|
||||
|
||||
binding.textMatchAlliance.setText("Match: " + (curMatchNum+1) + ", " + SettingsManager.getAllyPos());
|
||||
binding.textRescoutIndicator.setText("Things to rescout: " + DataManager.rescout_list.size());
|
||||
|
||||
binding.infoBox.addView(new TextViewBuilder(getContext(), "Our next match: Match " + nextMatch)
|
||||
.body1()
|
||||
.build());
|
||||
if(event.matches.size() == 0) {
|
||||
binding.textMatchAlliance.setText("No Matches!");
|
||||
} else {
|
||||
int teamNum = SettingsManager.getTeamNum();
|
||||
int curMatchNum = SettingsManager.getMatchNum();
|
||||
|
||||
int informedBy = event.getMostInformedBy(teamNum, curMatchNum);
|
||||
binding.textMatchAlliance.setText("Match: " + (curMatchNum+1) + ", " + SettingsManager.getAllyPos());
|
||||
|
||||
int nextMatch;
|
||||
try {
|
||||
nextMatch = event.getNextTeamMatch(teamNum, curMatchNum).matchIndex;
|
||||
} catch (Exception e){
|
||||
AlertManager.error("Sorry, in event ("+evcode+"), your team number ("+teamNum+") wasn't found!", e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
binding.infoBox.addView(new TextViewBuilder(getContext(), "Most informed by: Match " + informedBy)
|
||||
.body1()
|
||||
.build());
|
||||
binding.infoBox.addView(new TextViewBuilder(getContext(), "Our next match: Match " + nextMatch)
|
||||
.body1()
|
||||
.build());
|
||||
|
||||
int informedBy = event.getMostInformedBy(teamNum, curMatchNum);
|
||||
|
||||
|
||||
binding.infoBox.addView(new TextViewBuilder(getContext(), "Most informed by: Match " + informedBy)
|
||||
.body1()
|
||||
.build());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,6 +152,8 @@ public class SettingsFragment extends Fragment {
|
||||
|
||||
manager.addItem(new CheckboxSettingsItem(EnableQuickAllianceChangeKey, "Enable quick alliance swap", null));
|
||||
manager.addItem(new DropdownSettingsItem(FieldImageKey, "Field Image", new String[]{
|
||||
"2026",
|
||||
"2026 (Flipped)",
|
||||
"2025",
|
||||
"2025 (Flipped)"
|
||||
}));
|
||||
|
||||
@@ -174,23 +174,24 @@ public class HttpSync extends Thread {
|
||||
|
||||
TransferFile localFile = findInFileArray(localFiles, remoteFile.filename);
|
||||
|
||||
boolean shouldUpload;
|
||||
boolean shouldDownload;
|
||||
|
||||
// If there is no file on the sever, upload.
|
||||
if(localFile == null) {
|
||||
shouldUpload = true;
|
||||
shouldDownload = true;
|
||||
} else {
|
||||
// If the remote file is the same as the local one, do nothing.
|
||||
boolean checksumsEqual = !Objects.equals(localFile.checksum, remoteFile.checksum);
|
||||
|
||||
boolean checksumsNotEqual = !Objects.equals(localFile.checksum, remoteFile.checksum);
|
||||
// If the local file is updated after the remote file
|
||||
boolean after = after(remoteFile.updated, localFile.updated);
|
||||
// If the local file and remote file's upload dates are exactly the same
|
||||
boolean datesEqual = !localFile.updated.equals(remoteFile.updated);
|
||||
boolean datesNotEqual = !localFile.updated.equals(remoteFile.updated);
|
||||
|
||||
shouldUpload = (!checksumsEqual && (after) && !datesEqual);
|
||||
shouldDownload = checksumsNotEqual && after;
|
||||
}
|
||||
|
||||
if(shouldUpload) {
|
||||
if(shouldDownload) {
|
||||
downloadFile(remoteFile, serverIP);
|
||||
// await();
|
||||
Log.d(getClass().toString(), "RemoteFile: " + remoteFile.filename + ", " + remoteFile.checksum + ", " + remoteFile.updated + ": Downloaded");
|
||||
|
||||
@@ -165,12 +165,12 @@ public class TBASelectorFragment extends Fragment {
|
||||
try {
|
||||
Date startDate = format.parse(j.getString("start_date"));
|
||||
Date endDate = format.parse(j.getString("end_date"));
|
||||
if(currentTime.after(endDate)){
|
||||
if(currentTime.after(startDate) && currentTime.before(endDate)) {
|
||||
row.setColor(tba_current);
|
||||
} else if(currentTime.after(endDate)){
|
||||
row.setColor(tba_previous);
|
||||
}else if(currentTime.before(startDate)){
|
||||
row.setColor(tba_next);
|
||||
}else if(currentTime.after(startDate) && currentTime.before(endDate)){
|
||||
row.setColor(tba_current);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
AlertManager.error("Failed finding start and end dates!", e);
|
||||
|
||||
@@ -81,6 +81,12 @@ public class FieldPosView extends FrameLayout {
|
||||
case "2025 (Flipped)":
|
||||
setImageResource(R.drawable.field_2025_flipped);
|
||||
break;
|
||||
case "2026":
|
||||
setImageResource(R.drawable.field_2026);
|
||||
break;
|
||||
case "2026 (Flipped)":
|
||||
setImageResource(R.drawable.field_2026_flipped);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,9 +67,9 @@ public class Colors {
|
||||
public static final int fileselector_unselected_color = 0x50006600;
|
||||
|
||||
// TBA
|
||||
public static final int tba_previous = 0x30FF0000;
|
||||
public static final int tba_current = 0x50ff0000;
|
||||
public static final int tba_next = 0x30FFFF00;
|
||||
public static final int tba_previous = Color.argb(30, 64,64,64);
|
||||
public static final int tba_current = 0x7f00ff00;
|
||||
public static final int tba_next = Color.argb(30, 192,192,192);
|
||||
public static final int tba_red = 0x50ff0000;
|
||||
public static final int tba_blue = 0x500000ff;
|
||||
public static final int tba_toggle_background = 0x30000000;
|
||||
|
||||
@@ -263,6 +263,11 @@ public final class FileEditor {
|
||||
}
|
||||
}
|
||||
|
||||
// Sets the date modified to a long, long time ago
|
||||
public static boolean toTheArchaicPeriod(String name) {
|
||||
return new File(baseDir + name).setLastModified(0);
|
||||
}
|
||||
|
||||
public static boolean createFile(String filepath){
|
||||
if(fileExist(filepath)){
|
||||
return true;
|
||||
|
||||
@@ -46,8 +46,8 @@ public class SettingsManager {
|
||||
hm.put(UnameKey, "Username");
|
||||
hm.put(SelEVCodeKey, "unset");
|
||||
hm.put(WifiModeKey, false);
|
||||
hm.put(YearNumKey, 2025);
|
||||
hm.put(FieldImageKey, "2025");
|
||||
hm.put(YearNumKey, 2026);
|
||||
hm.put(FieldImageKey, "2026");
|
||||
hm.put(MatchNumKey, 0);
|
||||
hm.put(AllyPosKey, "red-1");
|
||||
hm.put(DataModeKey, 0);
|
||||
|
||||
|
After Width: | Height: | Size: 636 KiB |
|
After Width: | Height: | Size: 954 KiB |
@@ -60,7 +60,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Pit Data"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
android:textSize="35sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/team_description2"
|
||||
tools:layout_editor_absoluteX="0dp" />
|
||||
|
||||
@@ -73,6 +73,11 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@@ -81,7 +86,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Match Data"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
android:textSize="35sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/team_description2"
|
||||
tools:layout_editor_absoluteX="0dp" />
|
||||
|
||||
@@ -139,9 +144,13 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
agp = "8.13.0"
|
||||
agp = "8.13.2"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.1.5"
|
||||
espressoCore = "3.5.1"
|
||||
|
||||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 493 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 434 KiB |
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 454 KiB |
@@ -17,7 +17,6 @@ dependencyResolutionManagement {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven ( url = "https://jitpack.io" )
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||