diff --git a/README.md b/README.md index abd4ac9..3ce298f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -![Laser Scouter](https://raw.githubusercontent.com/Raktbastr/laserscouter/refs/heads/main/assets/laserscouterlogo.png) -WIP Logo +![Laser Scouter](https://raw.githubusercontent.com/Raktbastr/laserscouter/refs/heads/main/assets/main.png) # Simple FRC scouting app. Developed by me for Laser Robotics and the FRC community! @@ -9,12 +8,11 @@ Input your team number and event, and start scouting! When you're done export yo * Better and updated scouting questions, these are examples from Reefscape * Match scouting -* Online accessible version # Some extra notes -* This is a side project by a me and is my first Flutter project. Please leave suggestions and tips about what I could do better! -* I am providing APK's, but it may not be the most up to date version. +* This is a side project by me and is my first Flutter project. Please leave suggestions and tips about what I could do better! +* I am providing APK's, but it may not be the most up-to-date version. * To run on iOS you will still need to compile it and install with Xcode # How to contribute @@ -28,4 +26,4 @@ Input your team number and event, and start scouting! When you're done export yo 1. Run the command `flutter run` in your terminal while inside project folder. 2. Open the app in a browser, on your phone, or as a computer app. -* If you plan to test on an iPhone, you must have a Apple Developer account and a MacOS device with Xcode. \ No newline at end of file +* If you plan to test on an iPhone, you must have an Apple Developer account and a macOS device with Xcode. \ No newline at end of file diff --git a/lib/login.dart b/lib/login.dart index 181e6a5..7794b7d 100644 --- a/lib/login.dart +++ b/lib/login.dart @@ -146,7 +146,7 @@ class _LoginPageState extends State { return AlertDialog( title: const Text('Info'), content: const Text( - "This app makes use of The Blue Alliance APIv3 through Laser Proxy. No API keys are stored on device. Laser Scouter was created by FRC 2077 Laser Robotics. \n\nVersion: Rebuilt 26.2.14}" + "This app makes use of The Blue Alliance APIv3 through Laser Proxy. No API keys are stored on device. Laser Scouter was created by FRC 2077 Laser Robotics. \n\nVersion: Rebuilt v26.2.22" ), ); } diff --git a/lib/notespage.dart b/lib/notespage.dart index ee4122f..1582628 100644 --- a/lib/notespage.dart +++ b/lib/notespage.dart @@ -28,7 +28,7 @@ class _NotesPageState extends State { final _generalObservationsController = TextEditingController(); final _autonRundownController = TextEditingController(); final _intakePositionController = TextEditingController(); - final _scoreMechanisimController = TextEditingController(); + final _scoreMechanismController = TextEditingController(); double _fuelPerCycle = 0; bool _canDriveUnderTrench = false; bool _canDriveOverBump = false; @@ -49,7 +49,7 @@ class _NotesPageState extends State { _botPositionController.dispose(); _generalObservationsController.dispose(); _intakePositionController.dispose(); - _scoreMechanisimController.dispose(); + _scoreMechanismController.dispose(); super.dispose(); } @@ -58,7 +58,7 @@ class _NotesPageState extends State { } Future _loadNotes() async { - SharedPreferences prefs = await SharedPreferences.getInstance(); + prefs = await SharedPreferences.getInstance(); _botPositionController.text = prefs.getString(_generateKey('botPosition')) ?? ''; _botPositionController.addListener(() => _saveString('botPosition', _botPositionController.text)); @@ -72,8 +72,8 @@ class _NotesPageState extends State { _intakePositionController.text = prefs.getString(_generateKey('intakePosition')) ?? ''; _intakePositionController.addListener(() => _saveString('intakePosition', _intakePositionController.text)); - _scoreMechanisimController.text = prefs.getString(_generateKey('scoreMechanism')) ?? ''; - _scoreMechanisimController.addListener(() => _saveString('scoreMechanism', _scoreMechanisimController.text)); + _scoreMechanismController.text = prefs.getString(_generateKey('scoreMechanism')) ?? ''; + _scoreMechanismController.addListener(() => _saveString('scoreMechanism', _scoreMechanismController.text)); _fuelPerCycle = prefs.getDouble(_generateKey('fuelPerCycle')) ?? 0.0; _canDriveUnderTrench = prefs.getBool(_generateKey('canDriveUnderTrench')) ?? false; @@ -107,12 +107,12 @@ class _NotesPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text('Notes'), - ), - body: _isLoading - ? const Center(child: CircularProgressIndicator()) - : SafeArea( + appBar: AppBar( + title: Text('Notes'), + ), + body: _isLoading + ? const Center(child: CircularProgressIndicator()) + : SafeArea( child: Column( children: [ Padding( @@ -144,7 +144,7 @@ class _NotesPageState extends State { ), ], ), - ) + ) ); } @@ -192,6 +192,15 @@ class _NotesPageState extends State { ), ), const SizedBox(height: 16), + TextField( + controller: _intakePositionController, + decoration: const InputDecoration( + labelText: 'Intake Position', + hintText: 'e.g., Ground', + border: OutlineInputBorder(), + ), + ), + const SizedBox(height: 16), SwitchListTile( title: Text('Can Drive Over Bump', style: Theme.of(context).textTheme.titleSmall), value: _canDriveOverBump, @@ -303,12 +312,12 @@ class _NotesPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Cycle Time - ${_cycleTime.round()}', style: Theme.of(context).textTheme.titleSmall), + Text('Cycle Time - ${_cycleTime.round()}s', style: Theme.of(context).textTheme.titleSmall), Slider( value: _cycleTime, min: 0, - max: _cycleTime, - divisions: 50, + max: 60, + divisions: 60, label: _cycleTime.round().toString(), onChanged: (double value) { setState(() { @@ -325,4 +334,4 @@ class _NotesPageState extends State { ], ); } -} +} \ No newline at end of file diff --git a/lib/teampicker.dart b/lib/teampicker.dart index 25832ad..36aca8e 100644 --- a/lib/teampicker.dart +++ b/lib/teampicker.dart @@ -32,14 +32,17 @@ class _TeamPickerState extends State { Future _exportData() async { List header = []; header.add('Team Number'); - header.add('Drivetrain Type'); - header.add('Has Vision'); - header.add('Climb Level'); - header.add('Trenchable'); - header.add('Fuel Capacity'); header.add('Bot Position'); + header.add('Gen. Observations'); header.add('Auton Rundown'); - header.add('General Observations'); + header.add('Intake Position'); + header.add('Can Drive Over Bump'); + header.add('Can Go Under Trench'); + header.add('Can Give Fuel to HP'); + header.add('Climb Level'); + header.add('Fuel Capacity'); + header.add('Fuel per Cycle'); + header.add("Cycle Time"); List> data = []; for (int i = 0; i < teamCodes.length; i++) { @@ -47,41 +50,57 @@ class _TeamPickerState extends State { return '${teamCodes[i]}_${widget.eventCode}_$field'; } SharedPreferences prefs = await SharedPreferences.getInstance(); - String? autonRundown = prefs.getString(generateKey('autonRundown')); String? botPosition = prefs.getString(generateKey('botPosition')); String? generalObservations = prefs.getString(generateKey('generalObservations')); - String? driveTrainType = prefs.getString(generateKey('driveTrainType')); - String? hasVision = prefs.getBool(generateKey('hasVision')).toString(); + String? autonRundown = prefs.getString(generateKey('autonRundown')); + String? intakePosition = prefs.getString(generateKey('intakePosition')); + String? canDriveOverBump = prefs.getBool(generateKey('canDriveOverBump')).toString(); + String? canDriveUnderTrench = prefs.getBool(generateKey('canDriveUnderTrench')).toString(); + String? canGiveToHumanPlayer = prefs.getBool(generateKey('canGiveToHumanPlayer')).toString(); String? climbLevel = prefs.getDouble(generateKey('climbLevel')).toString(); - String? trenchable = prefs.getBool(generateKey('trenchable')).toString(); String? fuelCapacity = prefs.getDouble(generateKey('fuelCapacity')).toString(); + String? fuelPerCycle = prefs.getDouble(generateKey('fuelPerCycle')).toString(); + String? cycleTime = prefs.getDouble(generateKey('cycleTime')).toString(); - if (hasVision == 'null') { - hasVision = ''; + if (canDriveOverBump == 'null') { + canDriveOverBump = ''; + } + if (canDriveUnderTrench == 'null') { + canDriveUnderTrench = ''; + } + if (canGiveToHumanPlayer == 'null') { + canGiveToHumanPlayer = ''; } if (climbLevel == 'null') { climbLevel = ''; } - if (trenchable == 'null') { - trenchable = ''; - } if (fuelCapacity == 'null') { fuelCapacity = ''; } + if (fuelPerCycle == 'null') { + fuelPerCycle = ''; + } + if (cycleTime == 'null') { + cycleTime = ''; + } + List teamData = []; teamData.add(teamCodes[i]); - teamData.add(driveTrainType ?? ''); - teamData.add(hasVision); - teamData.add(climbLevel); - teamData.add(trenchable); - teamData.add(fuelCapacity); teamData.add(botPosition ?? ''); - teamData.add(autonRundown ?? ''); teamData.add(generalObservations ?? ''); + teamData.add(autonRundown ?? ''); + teamData.add(intakePosition ?? ''); + teamData.add(canDriveOverBump); + teamData.add(canDriveUnderTrench); + teamData.add(canGiveToHumanPlayer); + teamData.add(climbLevel); + teamData.add(fuelCapacity); + teamData.add(fuelPerCycle); + teamData.add(cycleTime); data.add(teamData); } - csv_export.myCSV(header, data, setHeadersInFirstRow: true, emptyRowsConfig: {1: 1}, fileName: 'laserscouter_${widget.eventCode}.csv'); + csv_export.myCSV(header, data, setHeadersInFirstRow: true, fileName: 'laserscouter_${widget.eventCode}.csv'); } Future _fetchTeams() async { diff --git a/pubspec.yaml b/pubspec.yaml index a7935b9..58b08bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 26.2.14+2 +version: 26.2.22 environment: sdk: ^3.10.7