Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
Merge branch 'unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiWorm0 committed Mar 16, 2019
2 parents a2810fa + b4da9fd commit 141f9bc
Show file tree
Hide file tree
Showing 20 changed files with 477 additions and 44 deletions.
77 changes: 45 additions & 32 deletions BlitzScouter/Models/DataModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,74 +18,87 @@ public DataModel()
counter3 = "0";
counter4 = "0";
counter5 = "0";
counter6 = "0";
counter7 = "0";
}

// Condense Functions into an Array
public string[] condenseData()
{
string[] arr = new string[11];
string[] arr = new string[14];

arr[0] = teamNum;
arr[1] = color;
arr[1] = roundNum;
arr[2] = color;

arr[2] = checkbox1.ToString();
arr[3] = checkbox2.ToString();
arr[4] = checkbox3.ToString();
arr[5] = checkbox4.ToString();
arr[3] = checkbox1.ToString();
arr[4] = checkbox2.ToString();
arr[5] = checkbox3.ToString();
arr[6] = checkbox4.ToString();

arr[6] = counter1;
arr[7] = counter2;
arr[8] = counter3;
arr[9] = counter4;
arr[10] = counter5;
arr[7] = counter1;
arr[8] = counter2;
arr[9] = counter3;
arr[10] = counter4;
arr[11] = counter5;
arr[12] = counter6;
arr[13] = counter7;

return arr;
}

// Condense Titles into an Array
public string[] condenseTitles()
{
string[] arr = new string[11];
string[] arr = new string[14];
arr[0] = "Team Num";
arr[1] = "Color";
arr[1] = "Round Num";
arr[2] = "Color";

arr[2] = "Crossed Line";
arr[3] = "Placed Piece";
arr[4] = "Foaled";
arr[5] = "Broke";

arr[6] = "Fuel in Rocket";
arr[7] = "Fuel in Cargo Ship";
arr[8] = "Hatch in Rocket";
arr[9] = "Hatch in Cargo Ship";
arr[10] = "Habitat Level";
arr[3] = "Crossed Line";
arr[4] = "Null";
arr[5] = "Foul";
arr[6] = "Broken";

arr[7] = "Cargo in Rocket";
arr[8] = "Cargo in Cargo Ship";
arr[9] = "Hatch in Rocket";
arr[10] = "Hatch in Cargo Ship";
arr[11] = "End Habitat";
arr[12] = "Pieces Placed";
arr[13] = "Start Habitat";

return arr;
}

// Team Data
public String teamNum { get; set; }
public String color { get; set; }
public String roundNum { get; set; }
public String color { get; set; }

// Scouting Data
[DisplayName("Crossed Line")]
public bool checkbox1 { get; set; }
[DisplayName("Placed Piece")]
public bool checkbox2 { get; set; }
[DisplayName("Foaled")]
[DisplayName("NULL")]
public bool checkbox2 { get; set; }
[DisplayName("Foul")]
public bool checkbox3 { get; set; }
[DisplayName("Broke")]
[DisplayName("Broken")]
public bool checkbox4 { get; set; }

[DisplayName("Fuel in Rocket")]
[DisplayName("Cargo in Rocket")]
public String counter1 { get; set; }
[DisplayName("Fuel in Cargo Ship")]
[DisplayName("Cargo in Cargo Ship")]
public String counter2 { get; set; }
[DisplayName("Hatch in Rocket")]
public String counter3 { get; set; }
[DisplayName("Hatch in Cargo Ship")]
public String counter4 { get; set; }
[DisplayName("Habitat Level")]
[DisplayName("Ending Habitat")]
public String counter5 { get; set; }
}
[DisplayName("Pieces Placed")]
public String counter6{ get; set; }
[DisplayName("Start Habitat")]
public String counter7{ get; set; }
}
}
7 changes: 3 additions & 4 deletions BlitzScouter/Views/Main/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@

@using (Html.BeginForm("Scout", "Main", FormMethod.Post))
{
<input type="button" id="header" value="Team Num" />
<input type="button" id="header" value="Scouting" />
<div id="content">
@Html.TextBoxFor(model => model.teamNum, new { id = "teamNum" })
@Html.TextBoxFor(model => model.teamNum, new { placeholder = "Team Number", id = "teamNum", required = string.Empty, type = "number" })
@Html.TextBoxFor(model => model.roundNum, new { placeholder = "Round Number", id = "roundNum", required = string.Empty, type = "number" })
@Html.HiddenFor(model => model.color, new { id = "color" })

<input id="colorRed" value="Red" class="color" type="button" onclick="red()" />
<input id="colorBlue" value="Blue" class="color" type="button" onclick="blue()" />

</div>
<input type="submit" id="footer" value="Continue" />
}
18 changes: 12 additions & 6 deletions BlitzScouter/Views/Main/Scout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,27 @@

@Html.HiddenFor(m => m.teamNum)
@Html.HiddenFor(m => m.color)
@Html.HiddenFor(m => m.roundNum)

<div class="center">
<div class="title">Sandstorm</div>
</div>
<div class="center">
<div class="checkbox"> @Html.DisplayNameFor(m => m.checkbox1) @Html.CheckBoxFor(m => m.checkbox1) </div>
<div class="checkbox"> @Html.DisplayNameFor(m => m.checkbox2) @Html.CheckBoxFor(m => m.checkbox2) </div>
</div>
<div class="center">
<div class="counter"> @Html.HiddenFor(m => m.counter7, new { id = "cnt7" }) <div class="counterDsp" id="cnt7disp">0</div> <input type="button" class="counterBtn" value="+" onclick="changeHab('cnt7', 1)"> <input type="button" class="counterBtn" value="-" onclick="changeHab('cnt7', -1)"> <div class="counterTxt"> @Html.DisplayNameFor(m => m.counter7) </div> </div>
</div>
<div class="center">
<div class="counter"> @Html.HiddenFor(m => m.counter6, new { id = "cnt6" }) <div class="counterDsp" id="cnt6disp">0</div> <input type="button" class="counterBtn" value="+" onclick="change('cnt6', 1)"> <input type="button" class="counterBtn" value="-" onclick="change('cnt6', -1)"> <div class="counterTxt"> @Html.DisplayNameFor(m => m.counter6) </div> </div>
</div>
<div class="center">
<div class="title">Teleoperated</div>
</div>
<div class="center">
<div class="checkbox"> @Html.DisplayNameFor(m => m.checkbox3) @Html.CheckBoxFor(m => m.checkbox3) </div>
<div class="checkbox"> @Html.DisplayNameFor(m => m.checkbox4) @Html.CheckBoxFor(m => m.checkbox4) </div>
</div>
<div class="center">
<div class="counter"> @Html.HiddenFor(m => m.counter1, new { id = "cnt1" }) <div class="counterDsp" id="cnt1disp">0</div> <input type="button" class="counterBtn" value="+" onclick="change('cnt1', 1)"> <input type="button" class="counterBtn" value="-" onclick="change('cnt1', -1)"> <div class="counterTxt"> @Html.DisplayNameFor(m => m.counter1) </div> </div>
</div>
Expand All @@ -33,15 +43,11 @@
<div class="center">
<div class="counter"> @Html.HiddenFor(m => m.counter4, new { id = "cnt4" }) <div class="counterDsp" id="cnt4disp">0</div> <input type="button" class="counterBtn" value="+" onclick="change('cnt4', 1)"> <input type="button" class="counterBtn" value="-" onclick="change('cnt4', -1)"> <div class="counterTxt"> @Html.DisplayNameFor(m => m.counter4) </div> </div>
</div>
<div class="center">
<div class="checkbox"> @Html.DisplayNameFor(m => m.checkbox3) @Html.CheckBoxFor(m => m.checkbox3) </div>
<div class="checkbox"> @Html.DisplayNameFor(m => m.checkbox4) @Html.CheckBoxFor(m => m.checkbox4) </div>
</div>
<div class="center">
<div class="title">End Game</div>
</div>
<div class="center">
<div class="counter"> @Html.HiddenFor(m => m.counter5, new { id = "cnt5" }) <div class="counterDsp" id="cnt5disp">0</div> <input type="button" class="counterBtn" value="+" onclick="change('cnt5', 1)"> <input type="button" class="counterBtn" value="-" onclick="change('cnt5', -1)"> <div class="counterTxt"> @Html.DisplayNameFor(m => m.counter5) </div> </div>
<div class="counter"> @Html.HiddenFor(m => m.counter5, new { id = "cnt5" }) <div class="counterDsp" id="cnt5disp">0</div> <input type="button" class="counterBtn" value="+" onclick="changeHab('cnt5', 1)"> <input type="button" class="counterBtn" value="-" onclick="changeHab('cnt5', -1)"> <div class="counterTxt"> @Html.DisplayNameFor(m => m.counter5) </div> </div>
</div>
</div>
<input type="submit" id="footer" value="Send Data" />
Expand Down
4 changes: 2 additions & 2 deletions BlitzScouter/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

<title>Blitz Scouter</title>

<link href="@Url.Content("~/css/site.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("~/js/site.js")"></script>
<link href="@Url.Content("~/css/site.css?v=1.2")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("~/js/site.js?v=1.2")"></script>

<link rel="apple-touch-icon" sizes="57x57" href="@Url.Content("~/images/apple-icon-57x57.png")" />
<link rel="apple-touch-icon" sizes="72x72" href="@Url.Content("~/images/apple-icon-72x72.png")" />
Expand Down
5 changes: 5 additions & 0 deletions BlitzScouter/gDriveCopy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
16 changes: 16 additions & 0 deletions BlitzScouter/gDriveCopy/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Gradle Build & Run",
"type": "shell",
"command": "gradle -q run",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
17 changes: 17 additions & 0 deletions BlitzScouter/gDriveCopy/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apply plugin: 'java'
apply plugin: 'application'

mainClassName = 'DriveQuickstart'
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = '1.0'

repositories {
mavenCentral()
}

dependencies {
compile 'com.google.api-client:google-api-client:1.23.0'
compile 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
compile 'com.google.apis:google-api-services-drive:v3-rev110-1.23.0'
}
Binary file added BlitzScouter/gDriveCopy/data.xlsx
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 141f9bc

Please sign in to comment.