Scouting: Add balancing during auto phase
Signed-off-by: Filip Kujawa <filip.j.kujawa@gmail.com>
Change-Id: Ie59790dbc8be4cd71da81f14eefb1a5d1db156b4
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index 9aae0d1..80f7e6a 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -15,6 +15,7 @@
ScoreLevel,
SubmitActions,
StartMatchAction,
+ AutoBalanceAction,
PickupObjectAction,
PlaceObjectAction,
RobotDeathAction,
@@ -53,6 +54,12 @@
position: number;
}
| {
+ type: 'autoBalanceAction';
+ timestamp?: number;
+ docked: boolean;
+ engaged: boolean;
+ }
+ | {
type: 'pickupObjectAction';
timestamp?: number;
objectType: ObjectType;
diff --git a/scouting/www/entry/entry.ng.html b/scouting/www/entry/entry.ng.html
index ec95f39..3901ec3 100644
--- a/scouting/www/entry/entry.ng.html
+++ b/scouting/www/entry/entry.ng.html
@@ -93,6 +93,24 @@
>
CUBE
</button>
+ <!-- 'Balancing' during auto. -->
+ <div *ngIf="autoPhase">
+ <label>
+ <input type="checkbox" (change)="dockedValue = $event.target.value" />
+ Docked
+ </label>
+ <label>
+ <input type="checkbox" (change)="engagedValue = $event.target.value" />
+ Engaged
+ </label>
+ <br />
+ <button
+ class="btn btn-info"
+ (click)="addAction({type: 'autoBalanceAction', docked: dockedValue, engaged: engagedValue});"
+ >
+ Submit Balancing
+ </button>
+ </div>
<button
*ngIf="autoPhase"
class="btn btn-info"