15 Commits

Author SHA1 Message Date
Michael Mikovsky 76a1b1ff70 Update version for new release 2026-03-05 15:21:12 -07:00
Michael Mikovsky 82465f213f Fix downloading new fields on tablets 2026-03-05 15:10:58 -07:00
Daniel Carta 3c7a879f51 Updated Fields 2026-02-13 17:26:07 -07:00
Daniel Carta 3157de62ff Update build.gradle.kts 2026-02-12 19:17:19 -07:00
Daniel Carta 5ddc032be9 Update to 2026
Updates app to 2026, also a few minor UI fixes.
2026-02-10 10:23:05 -07:00
Daniel Carta e6073ded49 Update README.md 2025-11-04 12:03:29 -07:00
Daniel Carta 7503cefa09 Update Screenshots
Changed old screenshots to new ones
2025-11-04 12:01:58 -07:00
Michael Mikovsky 3b4737e6bc Change version 2025-10-08 20:37:30 -06:00
Michael Mikovsky 76d28e46cd Update version to 2.1 2025-10-08 20:27:05 -06:00
Michael Mikovsky 73308f2acc Fix TBA Event coloring 2025-10-08 20:23:11 -06:00
Michael Mikovsky c18a93cb1a Change dashboard if there are no matches 2025-10-08 20:06:25 -06:00
Michael Mikovsky 3ca601f080 Merge pull request #15 from Team4388/increasing-verbosity
Add more comments
2025-10-08 11:57:56 -06:00
Michael Mikovsky 4554db9dc7 Merge branch 'main' into increasing-verbosity 2025-10-08 11:57:48 -06:00
Michael Mikovsky b5b1100c2c Merge pull request #14 from Team4388/random-ui-fixes
Random UI fixes
2025-10-08 11:56:30 -06:00
Daniel Carta ef761003c8 Increased the verbosity 2025-07-24 10:59:22 -06:00
39 changed files with 111 additions and 119 deletions
Vendored
BIN
View File
Binary file not shown.
+4 -5
View File
@@ -11,10 +11,10 @@
#### Here is an overview of the main features currently included in the app: #### 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. - 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. - 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 loosing any 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. - 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. - Data transfer including 2D codes, Bluetooth, and File Bundle.
- Exporting using CSV. - Exporting using CSV.
- Deployment on F-Droid - Deployment on F-Droid
@@ -22,10 +22,9 @@
#### Things that are yet to be implemented: #### Things that are yet to be implemented:
- A page that lets users cross-compare scouting data between teams. (Compare) - 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: #### Things that may or may not be implemented:
- Statbotics intgration - Statbotics integration
- Scout error estimation using OPR-like calculation - Scout error estimation using OPR-like calculation
- - Would most likely require Statbotics - - Would most likely require Statbotics
https://www.thebluealliance.com/avatars https://www.thebluealliance.com/avatars
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -16,7 +16,7 @@ android {
dependenciesInfo { dependenciesInfo {
// Disables dependency metadata when building APKs. // Disables dependency metadata when building APKs.
includeInApk = false includeInApk = false
// Disables dependency metadata when building Android App Bundles. // Disables dependency metadata when building Android App Bundles.5
includeInBundle = false includeInBundle = false
} }
@@ -25,8 +25,8 @@ android {
applicationId = "com.ridgebotics.ridgescout" applicationId = "com.ridgebotics.ridgescout"
minSdk = 24 minSdk = 24
targetSdk = 34 targetSdk = 34
versionCode = 11 // **IMPORTANT** Increment this before releasing on github versionCode = 15 // **IMPORTANT** Increment this before releasing on github
versionName = "1.4"// **IMPORTANT** Change this before releasing on github (<Year num since 2024>.<Update Version>) versionName = "3.1"// **IMPORTANT** Change this before releasing on github (<Year num since 2024>.<Update Version>)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
@@ -47,11 +47,13 @@ public class MainActivity extends AppCompatActivity {
// Load default match fields // Load default match fields
if(!FileEditor.fileExist(Fields.matchFieldsFilename)){ if(!FileEditor.fileExist(Fields.matchFieldsFilename)){
Fields.save(Fields.matchFieldsFilename, Fields.default_match_fields); Fields.save(Fields.matchFieldsFilename, Fields.default_match_fields);
FileEditor.toTheArchaicPeriod(Fields.matchFieldsFilename);
} }
// Load default pit fields // Load default pit fields
if(!FileEditor.fileExist(Fields.pitsFieldsFilename)){ if(!FileEditor.fileExist(Fields.pitsFieldsFilename)){
Fields.save(Fields.pitsFieldsFilename, Fields.default_pit_fields); Fields.save(Fields.pitsFieldsFilename, Fields.default_pit_fields);
FileEditor.toTheArchaicPeriod(Fields.pitsFieldsFilename);
} }
// get time zone for FTP file transfer // get time zone for FTP file transfer
@@ -30,36 +30,7 @@ public class Fields {
public static final FieldType[][] default_match_fields = new FieldType[][] { 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 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", "")
} }
}; };
@@ -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 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(),"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 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?", ""), new TextType(uuid(),"Auto Capability", "What autos does this team have?", ""),
@@ -41,7 +41,6 @@ public class ScoutingArray {
continue; continue;
case CREATE: case CREATE:
new_values[i] = create_transfer((CreateTransferType) tv); new_values[i] = create_transfer((CreateTransferType) tv);
continue;
} }
} }
this.array = new_values; this.array = new_values;
@@ -72,12 +71,6 @@ public class ScoutingArray {
return get_data_type_by_UUID(tv.UUID); return get_data_type_by_UUID(tv.UUID);
} }
// private dataType rename_transfer(renameTransferType tv){
// dataType dt = get_data_type_by_name(tv.name);
// dt.name = tv.new_name;
// return dt;
// }
private RawDataType create_transfer(CreateTransferType tv){ private RawDataType create_transfer(CreateTransferType tv){
FieldType it = get_input_type_by_UUID(version+1, tv.UUID); FieldType it = get_input_type_by_UUID(version+1, tv.UUID);
switch (it.getValueType()){ switch (it.getValueType()){
@@ -32,12 +32,6 @@ public class ScoutingFile {
ByteBuilder bb = new ByteBuilder() ByteBuilder bb = new ByteBuilder()
.addString(filename); .addString(filename);
// byte[] data = Objects.requireNonNull(fileEditor.readFile(filename));
// for(int i = 0; i < data.length / 65535; i++){
// bb.addRaw(255, fileEditor.getByteBlock(data, i*65535, (i+1)*65535));
// }
bb.addRaw(255, Objects.requireNonNull(FileEditor.readFile(filename))); bb.addRaw(255, Objects.requireNonNull(FileEditor.readFile(filename)));
return bb.build(); return bb.build();
@@ -16,11 +16,14 @@ import java.util.stream.IntStream;
// Class to contain data for an entire event. // Class to contain data for an entire event.
// Easily encoded and decoded to binary format. // Easily encoded and decoded to binary format.
public class frcEvent { public class frcEvent {
public String eventCode;
// public static final int typecode = 254; Unused, no idea what this is
public String eventCode; //Current event code
public String name; public String name;
public ArrayList<frcMatch> matches; public ArrayList<frcMatch> matches;
public ArrayList<frcTeam> teams; public ArrayList<frcTeam> teams;
// Turns frcEvent into raw data
public byte[] encode() { public byte[] encode() {
try { try {
ByteBuilder bb = new ByteBuilder() ByteBuilder bb = new ByteBuilder()
@@ -46,6 +49,7 @@ public class frcEvent {
} }
} }
//Decodes the frcEvent
public static frcEvent decode(byte[] bytes) { public static frcEvent decode(byte[] bytes) {
try { try {
ArrayList<BuiltByteParser.parsedObject> objects = ArrayList<BuiltByteParser.parsedObject> objects =
@@ -74,6 +78,7 @@ public class frcEvent {
} }
} }
//Generates text
@NonNull @NonNull
public String toString() { public String toString() {
return ( return (
@@ -207,6 +207,7 @@ public class CheckboxType extends FieldType {
parent.addView(chart); parent.addView(chart);
} }
//TODO
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){ public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
} }
@@ -103,7 +103,7 @@ public class DropdownType extends FieldType {
// Dropdown view
public void add_individual_view(LinearLayout parent, RawDataType data){ public void add_individual_view(LinearLayout parent, RawDataType data){
if(data.isNull()) return; if(data.isNull()) return;
@@ -112,7 +112,7 @@ public class DropdownType extends FieldType {
.layout_match_wrap() .layout_match_wrap()
.padding(20) .padding(20)
.size(18) .size(18)
.align_center() .align_left()
.build()); .build());
} }
@@ -122,7 +122,7 @@ public class DropdownType extends FieldType {
// Generates N amount of colors, all opposite colors
private static int[] generateEquidistantColors(int N) { private static int[] generateEquidistantColors(int N) {
int[] colors = new int[N]; int[] colors = new int[N];
float[] hsv = new float[3]; // Hue, Saturation, Value float[] hsv = new float[3]; // Hue, Saturation, Value
@@ -138,6 +138,7 @@ public class DropdownType extends FieldType {
return colors; return colors;
} }
// Turns the dropdown into a pie chart in the compiled view
public void add_compiled_view(LinearLayout parent, RawDataType[] data){ public void add_compiled_view(LinearLayout parent, RawDataType[] data){
PieChart chart = new PieChart(parent.getContext()); PieChart chart = new PieChart(parent.getContext());
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams( FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(
@@ -171,7 +172,7 @@ public class DropdownType extends FieldType {
// Turns the dropdown into a line chart in the history view
public void add_history_view(LinearLayout parent, RawDataType[] data){ public void add_history_view(LinearLayout parent, RawDataType[] data){
LineChart chart = new LineChart(parent.getContext()); LineChart chart = new LineChart(parent.getContext());
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams( FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(
@@ -238,6 +239,7 @@ public class DropdownType extends FieldType {
parent.addView(chart); parent.addView(chart);
} }
//TODO
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){ public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
} }
@@ -221,6 +221,7 @@ public class FieldposType extends FieldType {
parent.addView(chart); parent.addView(chart);
} }
//TODO
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){ public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
} }
@@ -121,7 +121,7 @@ public class NumberType extends FieldType {
if(data.isNull()) return; if(data.isNull()) return;
parent.addView(new TextViewBuilder(parent.getContext(), String.valueOf((int) data.get())) parent.addView(new TextViewBuilder(parent.getContext(), String.valueOf((int) data.get()))
.layout_match_wrap() .layout_match_wrap()
.align_center() .align_left()
.size(24) .size(24)
.build()); .build());
} }
@@ -312,6 +312,7 @@ public class NumberType extends FieldType {
parent.addView(chart); parent.addView(chart);
} }
//TODO
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){ public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
} }
@@ -106,7 +106,7 @@ public class TallyType extends FieldType {
if(data.isNull()) return; if(data.isNull()) return;
parent.addView(new TextViewBuilder(parent.getContext(), String.valueOf((int) data.get())) parent.addView(new TextViewBuilder(parent.getContext(), String.valueOf((int) data.get()))
.layout_match_wrap() .layout_match_wrap()
.align_center() .align_left()
.size(24) .size(24)
.build()); .build());
} }
@@ -115,7 +115,7 @@ public class TextType extends FieldType {
if(data.isNull()) return; if(data.isNull()) return;
parent.addView(new TextViewBuilder(parent.getContext(), (String) data.get()) parent.addView(new TextViewBuilder(parent.getContext(), (String) data.get())
.layout_match_wrap() .layout_match_wrap()
.align_center() .align_left()
.size(18) .size(18)
.build()); .build());
} }
@@ -220,6 +220,7 @@ public class TextType extends FieldType {
} }
//TODO
public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){ public void addDataToTable(TableLayout parent, Map<Integer, List<RawDataType>> data){
} }
@@ -11,6 +11,7 @@ import static com.ridgebotics.ridgescout.utility.DataManager.pit_transferValues;
import static com.ridgebotics.ridgescout.utility.DataManager.pit_values; import static com.ridgebotics.ridgescout.utility.DataManager.pit_values;
import android.content.Intent; import android.content.Intent;
import android.graphics.Paint;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.view.Gravity; import android.view.Gravity;
@@ -221,19 +222,18 @@ public class TeamsFragment extends Fragment {
ScoutingDataWriter.ParsedScoutingDataResult psda = ScoutingDataWriter.load(files[matchIndex], match_values, match_transferValues); ScoutingDataWriter.ParsedScoutingDataResult psda = ScoutingDataWriter.load(files[matchIndex], match_values, match_transferValues);
binding.matchArea.addView( TextView title = new TextViewBuilder(getContext(),
new TextViewBuilder(getContext(), "M" + (match_num) + " " + split[2] + "-" + split[3] + " by " + psda.username) "M" + (match_num) + " " + split[2] + "-" + split[3] + " by " + psda.username)
.align_center() .align_center()
.size(30) .size(30)
.padding(0,0,40,5) .padding(0, 0, 40, 5)
.build() .build();
title.setPaintFlags(title.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
); binding.matchArea.addView(title);
for (int i = 0; i < psda.data.array.length; i++) { for (int i = 0; i < psda.data.array.length; i++) {
TextViewBuilder tv = new TextViewBuilder(getContext(), match_latest_values[i].name) TextViewBuilder tv = new TextViewBuilder(getContext(), match_latest_values[i].name)
.align_center() .align_left()
.size(25); .size(25);
if (psda.data.array[i].isNull()) { if (psda.data.array[i].isNull()) {
@@ -282,6 +282,7 @@ public class TeamsFragment extends Fragment {
.build() .build()
); );
if(data[i] != null) if(data[i] != null)
match_latest_values[i].add_compiled_view(binding.matchArea, data[i]); 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++){ for(int i = 0; i < match_latest_values.length; i++){
binding.matchArea.addView( TextView tv = new TextViewBuilder(getContext(), match_latest_values[i].name)
new TextViewBuilder(getContext(), match_latest_values[i].name)
.align_center() .align_center()
.size(30) .size(30)
.padding(0,0,20,5) .padding(0,0,20,5)
.build() .build();
); tv.setPaintFlags(tv.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
binding.matchArea.addView(tv);
if(data[i] != null) if(data[i] != null)
match_latest_values[i].add_history_view(binding.matchArea, data[i]); match_latest_values[i].add_history_view(binding.matchArea, data[i]);
@@ -157,28 +157,35 @@ public class ScoutingFragment extends Fragment {
private void updateDashboard() { private void updateDashboard() {
binding.textName.setText("Welcome, " + SettingsManager.getUsername() + "!"); 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.textRescoutIndicator.setText("Things to rescout: " + DataManager.rescout_list.size());
binding.infoBox.addView(new TextViewBuilder(getContext(), "Our next match: Match " + nextMatch) if(event.matches.size() == 0) {
.body1() binding.textMatchAlliance.setText("No Matches!");
.build()); } 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) binding.infoBox.addView(new TextViewBuilder(getContext(), "Our next match: Match " + nextMatch)
.body1() .body1()
.build()); .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 CheckboxSettingsItem(EnableQuickAllianceChangeKey, "Enable quick alliance swap", null));
manager.addItem(new DropdownSettingsItem(FieldImageKey, "Field Image", new String[]{ manager.addItem(new DropdownSettingsItem(FieldImageKey, "Field Image", new String[]{
"2026",
"2026 (Flipped)",
"2025", "2025",
"2025 (Flipped)" "2025 (Flipped)"
})); }));
@@ -174,23 +174,24 @@ public class HttpSync extends Thread {
TransferFile localFile = findInFileArray(localFiles, remoteFile.filename); TransferFile localFile = findInFileArray(localFiles, remoteFile.filename);
boolean shouldUpload; boolean shouldDownload;
// If there is no file on the sever, upload. // If there is no file on the sever, upload.
if(localFile == null) { if(localFile == null) {
shouldUpload = true; shouldDownload = true;
} else { } else {
// If the remote file is the same as the local one, do nothing. // 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 // If the local file is updated after the remote file
boolean after = after(remoteFile.updated, localFile.updated); boolean after = after(remoteFile.updated, localFile.updated);
// If the local file and remote file's upload dates are exactly the same // 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); downloadFile(remoteFile, serverIP);
// await(); // await();
Log.d(getClass().toString(), "RemoteFile: " + remoteFile.filename + ", " + remoteFile.checksum + ", " + remoteFile.updated + ": Downloaded"); Log.d(getClass().toString(), "RemoteFile: " + remoteFile.filename + ", " + remoteFile.checksum + ", " + remoteFile.updated + ": Downloaded");
@@ -165,12 +165,12 @@ public class TBASelectorFragment extends Fragment {
try { try {
Date startDate = format.parse(j.getString("start_date")); Date startDate = format.parse(j.getString("start_date"));
Date endDate = format.parse(j.getString("end_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); row.setColor(tba_previous);
}else if(currentTime.before(startDate)){ }else if(currentTime.before(startDate)){
row.setColor(tba_next); row.setColor(tba_next);
}else if(currentTime.after(startDate) && currentTime.before(endDate)){
row.setColor(tba_current);
} }
} catch (Exception e) { } catch (Exception e) {
AlertManager.error("Failed finding start and end dates!", e); AlertManager.error("Failed finding start and end dates!", e);
@@ -81,6 +81,12 @@ public class FieldPosView extends FrameLayout {
case "2025 (Flipped)": case "2025 (Flipped)":
setImageResource(R.drawable.field_2025_flipped); setImageResource(R.drawable.field_2025_flipped);
break; 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; public static final int fileselector_unselected_color = 0x50006600;
// TBA // TBA
public static final int tba_previous = 0x30FF0000; public static final int tba_previous = Color.argb(30, 64,64,64);
public static final int tba_current = 0x50ff0000; public static final int tba_current = 0x7f00ff00;
public static final int tba_next = 0x30FFFF00; public static final int tba_next = Color.argb(30, 192,192,192);
public static final int tba_red = 0x50ff0000; public static final int tba_red = 0x50ff0000;
public static final int tba_blue = 0x500000ff; public static final int tba_blue = 0x500000ff;
public static final int tba_toggle_background = 0x30000000; 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){ public static boolean createFile(String filepath){
if(fileExist(filepath)){ if(fileExist(filepath)){
return true; return true;
@@ -46,8 +46,8 @@ public class SettingsManager {
hm.put(UnameKey, "Username"); hm.put(UnameKey, "Username");
hm.put(SelEVCodeKey, "unset"); hm.put(SelEVCodeKey, "unset");
hm.put(WifiModeKey, false); hm.put(WifiModeKey, false);
hm.put(YearNumKey, 2025); hm.put(YearNumKey, 2026);
hm.put(FieldImageKey, "2025"); hm.put(FieldImageKey, "2026");
hm.put(MatchNumKey, 0); hm.put(MatchNumKey, 0);
hm.put(AllyPosKey, "red-1"); hm.put(AllyPosKey, "red-1");
hm.put(DataModeKey, 0); hm.put(DataModeKey, 0);
BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 636 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 KiB

@@ -60,7 +60,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Pit Data" android:text="Pit Data"
android:textAlignment="center" android:textAlignment="center"
android:textSize="24sp" android:textSize="35sp"
app:layout_constraintTop_toBottomOf="@+id/team_description2" app:layout_constraintTop_toBottomOf="@+id/team_description2"
tools:layout_editor_absoluteX="0dp" /> tools:layout_editor_absoluteX="0dp" />
@@ -73,6 +73,11 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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> </LinearLayout>
<TextView <TextView
@@ -81,7 +86,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Match Data" android:text="Match Data"
android:textAlignment="center" android:textAlignment="center"
android:textSize="24sp" android:textSize="35sp"
app:layout_constraintTop_toBottomOf="@+id/team_description2" app:layout_constraintTop_toBottomOf="@+id/team_description2"
tools:layout_editor_absoluteX="0dp" /> tools:layout_editor_absoluteX="0dp" />
@@ -139,9 +144,13 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
+1 -1
View File
@@ -1,5 +1,5 @@
[versions] [versions]
agp = "8.13.0" agp = "8.13.2"
junit = "4.13.2" junit = "4.13.2"
junitVersion = "1.1.5" junitVersion = "1.1.5"
espressoCore = "3.5.1" espressoCore = "3.5.1"
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 493 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 454 KiB

-1
View File
@@ -17,7 +17,6 @@ dependencyResolutionManagement {
google() google()
mavenCentral() mavenCentral()
maven ( url = "https://jitpack.io" ) maven ( url = "https://jitpack.io" )
jcenter()
} }
} }