mirror of
https://github.com/Team4388/RidgeScout.git
synced 2026-06-09 08:38:03 -06:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a9f846e77 | |||
| f37f12178b | |||
| e537aab819 | |||
| 9607241c53 | |||
| 4764aea990 |
@@ -4,7 +4,7 @@ Ridgebotics 2025 scouting app in Android
|
|||||||
## TODO:
|
## TODO:
|
||||||
#### Scouting:
|
#### Scouting:
|
||||||
- Make the "Report" menu, A tool that lets users select data to display from the the teams and compare menus.
|
- Make the "Report" menu, A tool that lets users select data to display from the the teams and compare menus.
|
||||||
- Make practice mode
|
- Make practice mode??
|
||||||
#### Data Analysis:
|
#### Data Analysis:
|
||||||
- Statbotics intigration???
|
- Statbotics intigration???
|
||||||
- AI overview of scouting data for a team???
|
- AI overview of scouting data for a team???
|
||||||
@@ -12,13 +12,13 @@ Ridgebotics 2025 scouting app in Android
|
|||||||
#### Functionality:
|
#### Functionality:
|
||||||
- Add more types of data fields.
|
- Add more types of data fields.
|
||||||
- Test the scouting app
|
- Test the scouting app
|
||||||
- Deploy to F-Droid
|
|
||||||
|
|
||||||
## In Progress:
|
## In Progress:
|
||||||
#### Scouting:
|
#### Scouting:
|
||||||
#### Data Analysis:
|
#### Data Analysis:
|
||||||
#### Functionality:
|
#### Functionality:
|
||||||
- Make server software to allow for easy sync over wifi - FTP
|
- Make server software to allow for easy sync over wifi - FTP
|
||||||
|
- Deploy to F-Droid
|
||||||
|
|
||||||
## Done:
|
## Done:
|
||||||
#### Scouting:
|
#### Scouting:
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.ridgebotics.ridgescout"
|
applicationId = "com.ridgebotics.ridgescout"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 2
|
versionCode = 3
|
||||||
versionName = "0.2"
|
versionName = "0.3"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@@ -78,6 +78,8 @@ dependencies {
|
|||||||
|
|
||||||
implementation("org.tensorflow:tensorflow-lite-task-text:0.3.0")
|
implementation("org.tensorflow:tensorflow-lite-task-text:0.3.0")
|
||||||
|
|
||||||
|
implementation("io.github.ollama4j:ollama4j:1.0.79")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// implementation("com.github.DeveloperPaul123:SimpleBluetoothLibrary:1.5.1")
|
// implementation("com.github.DeveloperPaul123:SimpleBluetoothLibrary:1.5.1")
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
|
|||||||
public void useAppContext() {
|
public void useAppContext() {
|
||||||
// Context of the app under test.
|
// Context of the app under test.
|
||||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||||
assertEquals("com.astatin3.scoutingapp2025", appContext.getPackageName());
|
assertEquals("com.ridgebotics.ridgescout", appContext.getPackageName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.ScoutingApp2025"
|
android:theme="@style/Theme.RidgeScout"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
<activity
|
<activity
|
||||||
@@ -42,6 +42,8 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
<action android:name="android.intent.action.GET_CONTENT" />
|
<action android:name="android.intent.action.GET_CONTENT" />
|
||||||
<category android:name="android.intent.category.OPEN_FILE" />
|
<category android:name="android.intent.category.OPEN_FILE" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
<data android:mimeType="*/*" />
|
<data android:mimeType="*/*" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.data;
|
package com.ridgebotics.ridgescout.ui.data;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.SettingsVersionStack.latestSettings.settings;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -11,6 +14,13 @@ import androidx.fragment.app.Fragment;
|
|||||||
|
|
||||||
import com.ridgebotics.ridgescout.databinding.FragmentDataCompareBinding;
|
import com.ridgebotics.ridgescout.databinding.FragmentDataCompareBinding;
|
||||||
import com.ridgebotics.ridgescout.databinding.FragmentDataReportBinding;
|
import com.ridgebotics.ridgescout.databinding.FragmentDataReportBinding;
|
||||||
|
import com.ridgebotics.ridgescout.types.frcMatch;
|
||||||
|
import com.ridgebotics.ridgescout.utility.AlertManager;
|
||||||
|
import com.ridgebotics.ridgescout.utility.DataManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
public class CompareFragment extends Fragment {
|
public class CompareFragment extends Fragment {
|
||||||
FragmentDataCompareBinding binding;
|
FragmentDataCompareBinding binding;
|
||||||
|
|||||||
@@ -1,15 +1,27 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.data;
|
package com.ridgebotics.ridgescout.ui.data;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.SettingsVersionStack.latestSettings.settings;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TableRow;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
import com.ridgebotics.ridgescout.databinding.FragmentDataReportBinding;
|
import com.ridgebotics.ridgescout.databinding.FragmentDataReportBinding;
|
||||||
|
import com.ridgebotics.ridgescout.types.frcMatch;
|
||||||
|
import com.ridgebotics.ridgescout.utility.AlertManager;
|
||||||
|
import com.ridgebotics.ridgescout.utility.DataManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
public class ReportFragment extends Fragment {
|
public class ReportFragment extends Fragment {
|
||||||
FragmentDataReportBinding binding;
|
FragmentDataReportBinding binding;
|
||||||
@@ -19,6 +31,91 @@ public class ReportFragment extends Fragment {
|
|||||||
|
|
||||||
binding = FragmentDataReportBinding.inflate(inflater, container, false);
|
binding = FragmentDataReportBinding.inflate(inflater, container, false);
|
||||||
|
|
||||||
|
getReportMatches();
|
||||||
|
|
||||||
return binding.getRoot();
|
return binding.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public frcMatch[] getTeamMatches(int teamNum){
|
||||||
|
DataManager.reload_event();
|
||||||
|
List<frcMatch> teamMatches = new ArrayList<>();
|
||||||
|
for(int i = 0; i < event.matches.size(); i++){
|
||||||
|
frcMatch match = event.matches.get(i);
|
||||||
|
boolean isTeamMatch = false;
|
||||||
|
isTeamMatch = IntStream.of(match.redAlliance).anyMatch(x -> x == teamNum);
|
||||||
|
isTeamMatch = isTeamMatch || IntStream.of(match.blueAlliance).anyMatch(x -> x == teamNum);
|
||||||
|
if(isTeamMatch)
|
||||||
|
teamMatches.add(match);
|
||||||
|
}
|
||||||
|
return teamMatches.toArray(new frcMatch[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getMostRecentTeamMatch(int teamNum, int curMatch){
|
||||||
|
frcMatch[] teamMatches = getTeamMatches(teamNum);
|
||||||
|
int maxMatch = - 1;
|
||||||
|
|
||||||
|
for(int i = 0; i < teamMatches.length; i++) {
|
||||||
|
if (teamMatches[i].matchIndex < curMatch &&
|
||||||
|
teamMatches[i].matchIndex > maxMatch) {
|
||||||
|
maxMatch = teamMatches[i].matchIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(maxMatch == -1)
|
||||||
|
return curMatch;
|
||||||
|
else
|
||||||
|
return maxMatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getReportMatches(){
|
||||||
|
// String out = "";
|
||||||
|
int ourTeamNum = settings.get_team_num();
|
||||||
|
frcMatch[] teamMatches = getTeamMatches(ourTeamNum);
|
||||||
|
|
||||||
|
TableRow tr = new TableRow(getContext());
|
||||||
|
|
||||||
|
TextView tv = new TextView(getContext());
|
||||||
|
tv.setText("Team match");
|
||||||
|
tr.addView(tv);
|
||||||
|
|
||||||
|
tv = new TextView(getContext());
|
||||||
|
tv.setText("Most informed match");
|
||||||
|
tr.addView(tv);
|
||||||
|
|
||||||
|
binding.teamMatchesTable.addView(tr);
|
||||||
|
binding.teamMatchesTable.setStretchAllColumns(true);
|
||||||
|
|
||||||
|
for(int i = 0; i < teamMatches.length; i++){
|
||||||
|
tr = new TableRow(getContext());
|
||||||
|
|
||||||
|
tv = new TextView(getContext());
|
||||||
|
tv.setText(String.valueOf(teamMatches[i].matchIndex));
|
||||||
|
tr.addView(tv);
|
||||||
|
|
||||||
|
int maxMatch = -1;
|
||||||
|
for(int a = 0; a < 6; a++){
|
||||||
|
int teamNum = 0;
|
||||||
|
if(a < 3)
|
||||||
|
teamNum = teamMatches[i].redAlliance[a];
|
||||||
|
else
|
||||||
|
teamNum = teamMatches[i].blueAlliance[a-3];
|
||||||
|
|
||||||
|
if(teamNum == ourTeamNum)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int matchNum = getMostRecentTeamMatch(teamNum, teamMatches[i].matchIndex);
|
||||||
|
if(maxMatch < matchNum)
|
||||||
|
maxMatch = matchNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tv = new TextView(getContext());
|
||||||
|
tv.setText(String.valueOf(maxMatch));
|
||||||
|
tr.addView(tv);
|
||||||
|
|
||||||
|
binding.teamMatchesTable.addView(tr);
|
||||||
|
}
|
||||||
|
// AlertManager.error(out);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,29 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TableLayout
|
||||||
|
android:id="@+id/teamMatchesTable"
|
||||||
|
android:layout_width="409dp"
|
||||||
|
android:layout_height="729dp"
|
||||||
|
android:layout_marginStart="1dp"
|
||||||
|
android:layout_marginEnd="1dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView4">
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</TableLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView3"
|
android:id="@+id/textView4"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="TBD"
|
android:text="1234"
|
||||||
android:textSize="34sp"
|
android:textSize="24sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.ScoutingApp2025" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="Theme.RidgeScout" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
<item name="colorPrimary">@color/main_200</item>
|
<item name="colorPrimary">@color/main_200</item>
|
||||||
<item name="colorPrimaryVariant">@color/main_700</item>
|
<item name="colorPrimaryVariant">@color/main_700</item>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.ScoutingApp2025" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="Theme.RidgeScout" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
<item name="colorPrimary">@color/main_500</item>
|
<item name="colorPrimary">@color/main_500</item>
|
||||||
<item name="colorPrimaryVariant">@color/main_700</item>
|
<item name="colorPrimaryVariant">@color/main_700</item>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 373 KiB After Width: | Height: | Size: 373 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
+1
-1
@@ -21,6 +21,6 @@ dependencyResolutionManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "ScoutingApp2025"
|
rootProject.name = "RidgeScout"
|
||||||
include(":app")
|
include(":app")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user