Scouting: Update dead screen and dropped
Revive and undo should be separate because we need to make a distinction between a scouter accidentally pressing the dead button vs the robot dying and then reviving. Scouters should also be able to end the game from the death screen.
An N/A radio button was added for robot position in endgame to allow scouters to unselect Park, Harmony, etc.
Previous implementation of dropped was based on if there are two picked up actions in a row. Since scouters currently press undo if the robot drops the note, this will never happen. A separate dropped button fixes this.
Signed-off-by: Emily Markova <emily.markova@gmail.com>
Change-Id: Ice943c56b0efa93d96cbcc432a771cf3cad10d9e
diff --git a/scouting/db/db.go b/scouting/db/db.go
index 5d7a56c..016ca95 100644
--- a/scouting/db/db.go
+++ b/scouting/db/db.go
@@ -86,6 +86,7 @@
NotesDropped int32
Penalties int32
AvgCycle int64
+ RobotDied bool
Park, OnStage, Harmony, TrapNote, Spotlight bool
// The username of the person who collected these statistics.
diff --git a/scouting/db/db_test.go b/scouting/db/db_test.go
index 369ea58..882dfbc 100644
--- a/scouting/db/db_test.go
+++ b/scouting/db/db_test.go
@@ -149,7 +149,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 0, Amp: 5, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: false, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "emma",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "emma",
},
Stats2024{
PreScouting: false, TeamNumber: "942",
@@ -157,7 +157,7 @@
SpeakerAuto: 2, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 0, Amp: 5, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: false, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "harry",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "harry",
},
Stats2024{
PreScouting: false, TeamNumber: "432",
@@ -165,7 +165,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 2, Amp: 1, SpeakerAmplified: 3, AmpAmplified: 0,
NotesDropped: 0, Penalties: 0, TrapNote: false, Spotlight: false, AvgCycle: 0,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "henry",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "henry",
},
Stats2024{
PreScouting: false, TeamNumber: "52A",
@@ -173,7 +173,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 1, SpeakerAmplified: 2, AmpAmplified: 3,
NotesDropped: 2, Penalties: 0, TrapNote: true, Spotlight: false, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "jordan",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "jordan",
},
Stats2024{
PreScouting: false, TeamNumber: "745",
@@ -181,7 +181,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 5, Amp: 0, SpeakerAmplified: 2, AmpAmplified: 1,
NotesDropped: 1, Penalties: 1, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "taylor",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "taylor",
},
Stats2024{
PreScouting: false, TeamNumber: "934",
@@ -189,7 +189,7 @@
SpeakerAuto: 1, AmpAuto: 3, NotesDroppedAuto: 0, MobilityAuto: true,
Speaker: 0, Amp: 3, SpeakerAmplified: 2, AmpAmplified: 2,
NotesDropped: 0, Penalties: 3, TrapNote: true, Spotlight: false, AvgCycle: 0,
- Park: false, OnStage: false, Harmony: true, CollectedBy: "katie",
+ Park: false, OnStage: false, Harmony: true, RobotDied: false, CollectedBy: "katie",
},
}
@@ -236,7 +236,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 0, Amp: 5, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "emma",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "emma",
}
// Attempt to insert the non-pre-scouted data and make sure it fails.
@@ -265,7 +265,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 0, Amp: 5, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "emma",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "emma",
},
Stats2024{
PreScouting: false, TeamNumber: "978",
@@ -273,7 +273,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 1, Amp: 2, SpeakerAmplified: 0, AmpAmplified: 2,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "emma",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "emma",
},
Stats2024{
PreScouting: false, TeamNumber: "328A",
@@ -281,7 +281,7 @@
SpeakerAuto: 1, AmpAuto: 1, NotesDroppedAuto: 1, MobilityAuto: true,
Speaker: 0, Amp: 1, SpeakerAmplified: 1, AmpAmplified: 5,
NotesDropped: 1, Penalties: 0, TrapNote: false, Spotlight: true, AvgCycle: 0,
- Park: false, OnStage: false, Harmony: true, CollectedBy: "emma",
+ Park: false, OnStage: false, Harmony: true, RobotDied: true, CollectedBy: "emma",
},
}
@@ -700,7 +700,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 1, Amp: 3, SpeakerAmplified: 1, AmpAmplified: 3,
NotesDropped: 0, Penalties: 0, TrapNote: false, Spotlight: false, AvgCycle: 0,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "bailey",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "bailey",
},
Stats2024{
PreScouting: false, TeamNumber: "645",
@@ -708,7 +708,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 1, Amp: 2, SpeakerAmplified: 0, AmpAmplified: 1,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "kate",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "kate",
},
Stats2024{
PreScouting: false, TeamNumber: "323",
@@ -716,7 +716,7 @@
SpeakerAuto: 1, AmpAuto: 1, NotesDroppedAuto: 1, MobilityAuto: true,
Speaker: 0, Amp: 0, SpeakerAmplified: 2, AmpAmplified: 1,
NotesDropped: 1, Penalties: 0, TrapNote: false, Spotlight: false, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "tyler",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "tyler",
},
Stats2024{
PreScouting: false, TeamNumber: "542",
@@ -724,7 +724,7 @@
SpeakerAuto: 1, AmpAuto: 1, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 1, Amp: 2, SpeakerAmplified: 2, AmpAmplified: 1,
NotesDropped: 1, Penalties: 0, TrapNote: false, Spotlight: false, AvgCycle: 0,
- Park: false, OnStage: false, Harmony: true, CollectedBy: "max",
+ Park: false, OnStage: false, Harmony: true, RobotDied: false, CollectedBy: "max",
},
}
@@ -735,7 +735,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 1, Amp: 3, SpeakerAmplified: 1, AmpAmplified: 3,
NotesDropped: 0, Penalties: 0, TrapNote: false, Spotlight: false, AvgCycle: 0,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "bailey",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "bailey",
},
}
@@ -1154,7 +1154,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 0, Amp: 5, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: false, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "emma",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "emma",
},
Stats2024{
PreScouting: false, TeamNumber: "942",
@@ -1162,7 +1162,7 @@
SpeakerAuto: 2, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 0, Amp: 5, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 0, Penalties: 2, TrapNote: true, Spotlight: false, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "harry",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "harry",
},
Stats2024{
PreScouting: false, TeamNumber: "432",
@@ -1170,7 +1170,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 2, MobilityAuto: true,
Speaker: 2, Amp: 1, SpeakerAmplified: 3, AmpAmplified: 0,
NotesDropped: 0, Penalties: 0, TrapNote: false, Spotlight: false, AvgCycle: 0,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "henry",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "henry",
},
Stats2024{
PreScouting: false, TeamNumber: "52A",
@@ -1178,7 +1178,7 @@
SpeakerAuto: 1, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 1, SpeakerAmplified: 2, AmpAmplified: 3,
NotesDropped: 2, Penalties: 0, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "jordan",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "jordan",
},
}
diff --git a/scouting/webserver/requests/messages/request_2024_data_scouting_response.fbs b/scouting/webserver/requests/messages/request_2024_data_scouting_response.fbs
index c36174d..f450d38 100644
--- a/scouting/webserver/requests/messages/request_2024_data_scouting_response.fbs
+++ b/scouting/webserver/requests/messages/request_2024_data_scouting_response.fbs
@@ -26,6 +26,7 @@
on_stage: bool (id:16);
harmony: bool (id:17);
spotlight: bool (id:22);
+ robot_died: bool (id:23);
pre_scouting:bool (id:20);
collected_by:string (id:21);
diff --git a/scouting/webserver/requests/messages/submit_2024_actions.fbs b/scouting/webserver/requests/messages/submit_2024_actions.fbs
index e85563f..9462fbe 100644
--- a/scouting/webserver/requests/messages/submit_2024_actions.fbs
+++ b/scouting/webserver/requests/messages/submit_2024_actions.fbs
@@ -9,6 +9,7 @@
kAMP_AMPLIFIED,
kSPEAKER,
kSPEAKER_AMPLIFIED,
+ kDROPPED,
}
table MobilityAction {
diff --git a/scouting/webserver/requests/requests.go b/scouting/webserver/requests/requests.go
index a9919af..3cd14a7 100644
--- a/scouting/webserver/requests/requests.go
+++ b/scouting/webserver/requests/requests.go
@@ -452,7 +452,7 @@
PreScouting: submit2024Actions.PreScouting(), TeamNumber: string(submit2024Actions.TeamNumber()), MatchNumber: submit2024Actions.MatchNumber(), SetNumber: submit2024Actions.SetNumber(), CompLevel: string(submit2024Actions.CompLevel()),
StartingQuadrant: 0, SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 0, SpeakerAmplified: 0, AmpAmplified: 0, NotesDropped: 0, Penalties: 0,
- TrapNote: false, Spotlight: false, AvgCycle: 0, Park: false, OnStage: false, Harmony: false, CollectedBy: "",
+ TrapNote: false, Spotlight: false, AvgCycle: 0, Park: false, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "",
}
// Loop over all actions.
for i := 0; i < submit2024Actions.ActionsListLength(); i++ {
@@ -481,19 +481,15 @@
penaltyAction.Init(actionTable.Bytes, actionTable.Pos)
stat.Penalties += penaltyAction.Penalties()
+ } else if action_type == submit_2024_actions.ActionTypeRobotDeathAction {
+ var robotDeathAction submit_2024_actions.RobotDeathAction
+ robotDeathAction.Init(actionTable.Bytes, actionTable.Pos)
+ stat.RobotDied = true
+
} else if action_type == submit_2024_actions.ActionTypePickupNoteAction {
var pick_up_action submit_2024_actions.PickupNoteAction
pick_up_action.Init(actionTable.Bytes, actionTable.Pos)
- if picked_up == true {
- auto := pick_up_action.Auto()
- if auto == false {
- stat.NotesDropped += 1
- } else {
- stat.NotesDroppedAuto += 1
- }
- } else {
- picked_up = true
- }
+ picked_up = true
} else if action_type == submit_2024_actions.ActionTypePlaceNoteAction {
var place_action submit_2024_actions.PlaceNoteAction
place_action.Init(actionTable.Bytes, actionTable.Pos)
@@ -514,6 +510,10 @@
stat.SpeakerAuto += 1
} else if score_type == submit_2024_actions.ScoreTypekSPEAKER_AMPLIFIED && !auto {
stat.SpeakerAmplified += 1
+ } else if score_type == submit_2024_actions.ScoreTypekDROPPED && auto {
+ stat.NotesDroppedAuto += 1
+ } else if score_type == submit_2024_actions.ScoreTypekDROPPED && !auto {
+ stat.NotesDropped += 1
} else {
return db.Stats2024{}, errors.New(fmt.Sprintf("Got unknown ObjectType/ScoreLevel/Auto combination"))
}
@@ -595,6 +595,7 @@
Park: stat.Park,
OnStage: stat.OnStage,
Harmony: stat.Harmony,
+ RobotDied: stat.RobotDied,
CollectedBy: stat.CollectedBy,
})
}
diff --git a/scouting/webserver/requests/requests_test.go b/scouting/webserver/requests/requests_test.go
index ebe73f3..26fad0f 100644
--- a/scouting/webserver/requests/requests_test.go
+++ b/scouting/webserver/requests/requests_test.go
@@ -137,8 +137,8 @@
MatchNumber: 1, SetNumber: 1, CompLevel: "qm", StartingQuadrant: 3,
SpeakerAuto: 2, AmpAuto: 4, NotesDroppedAuto: 1, MobilityAuto: true,
Speaker: 0, Amp: 1, SpeakerAmplified: 2, AmpAmplified: 1,
- NotesDropped: 0, Penalties: 01, TrapNote: true, Spotlight: false, AvgCycle: 233,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "alex",
+ NotesDropped: 0, Penalties: 1, TrapNote: true, Spotlight: false, AvgCycle: 233,
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "alex",
},
{
PreScouting: false, TeamNumber: "973",
@@ -146,7 +146,7 @@
SpeakerAuto: 0, AmpAuto: 2, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 4, SpeakerAmplified: 3, AmpAmplified: 1,
NotesDropped: 0, Penalties: 1, TrapNote: true, Spotlight: false, AvgCycle: 120,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "bob",
+ Park: true, OnStage: false, Harmony: false, RobotDied: true, CollectedBy: "bob",
},
},
}
@@ -215,7 +215,7 @@
SpeakerAuto: 1, AmpAuto: 1, NotesDroppedAuto: 0, MobilityAuto: true,
Speaker: 4, Amp: 2, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 2, Penalties: 2, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "alex",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "alex",
},
{
PreScouting: false, TeamNumber: "982",
@@ -223,7 +223,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 2, SpeakerAmplified: 3, AmpAmplified: 2,
NotesDropped: 1, Penalties: 0, TrapNote: false, Spotlight: true, AvgCycle: 0,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "george",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "george",
},
},
}
@@ -248,7 +248,7 @@
SpeakerAuto: 1, AmpAuto: 1, NotesDroppedAuto: 0, MobilityAuto: true,
Speaker: 4, Amp: 2, SpeakerAmplified: 1, AmpAmplified: 0,
NotesDropped: 2, Penalties: 2, TrapNote: true, Spotlight: true, AvgCycle: 0,
- Park: true, OnStage: false, Harmony: false, CollectedBy: "alex",
+ Park: true, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "alex",
},
{
PreScouting: false, TeamNumber: "982",
@@ -256,7 +256,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 2, SpeakerAmplified: 3, AmpAmplified: 2,
NotesDropped: 1, Penalties: 0, TrapNote: false, Spotlight: true, AvgCycle: 0,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "george",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "george",
},
},
}
@@ -441,6 +441,43 @@
Auto: false,
},
},
+ Timestamp: 3200,
+ },
+ {
+ ActionTaken: &submit_2024_actions.ActionTypeT{
+ Type: submit_2024_actions.ActionTypePlaceNoteAction,
+ Value: &submit_2024_actions.PlaceNoteActionT{
+ ScoreType: submit_2024_actions.ScoreTypekDROPPED,
+ Auto: false,
+ },
+ },
+ Timestamp: 3300,
+ },
+ {
+ ActionTaken: &submit_2024_actions.ActionTypeT{
+ Type: submit_2024_actions.ActionTypeRobotDeathAction,
+ Value: &submit_2024_actions.RobotDeathActionT{
+ RobotDead: true,
+ },
+ },
+ Timestamp: 3400,
+ },
+ {
+ ActionTaken: &submit_2024_actions.ActionTypeT{
+ Type: submit_2024_actions.ActionTypeRobotDeathAction,
+ Value: &submit_2024_actions.RobotDeathActionT{
+ RobotDead: false,
+ },
+ },
+ Timestamp: 3450,
+ },
+ {
+ ActionTaken: &submit_2024_actions.ActionTypeT{
+ Type: submit_2024_actions.ActionTypePickupNoteAction,
+ Value: &submit_2024_actions.PickupNoteActionT{
+ Auto: false,
+ },
+ },
Timestamp: 3500,
},
{
@@ -478,10 +515,10 @@
expected := db.Stats2024{
PreScouting: false, TeamNumber: "4244",
MatchNumber: 3, SetNumber: 1, CompLevel: "quals", StartingQuadrant: 2,
- SpeakerAuto: 0, AmpAuto: 1, NotesDroppedAuto: 1, MobilityAuto: true,
+ SpeakerAuto: 0, AmpAuto: 1, NotesDroppedAuto: 0, MobilityAuto: true,
Speaker: 0, Amp: 0, SpeakerAmplified: 1, AmpAmplified: 1,
- NotesDropped: 0, Penalties: 5, TrapNote: false, Spotlight: false, AvgCycle: 950,
- Park: false, OnStage: false, Harmony: true, CollectedBy: "",
+ NotesDropped: 1, Penalties: 5, TrapNote: false, Spotlight: false, AvgCycle: 633,
+ Park: false, OnStage: false, Harmony: true, RobotDied: true, CollectedBy: "",
}
if expected != response {
@@ -1202,7 +1239,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 1, Amp: 0, SpeakerAmplified: 0, AmpAmplified: 0,
NotesDropped: 0, Penalties: 0, TrapNote: false, Spotlight: false, AvgCycle: 0,
- Park: false, OnStage: false, Harmony: false, CollectedBy: "debug_cli",
+ Park: false, OnStage: false, Harmony: false, RobotDied: false, CollectedBy: "debug_cli",
},
}
@@ -1448,7 +1485,7 @@
SpeakerAuto: 0, AmpAuto: 1, NotesDroppedAuto: 1, MobilityAuto: true,
Speaker: 0, Amp: 1, SpeakerAmplified: 1, AmpAmplified: 1,
NotesDropped: 0, Penalties: 1, TrapNote: true, Spotlight: false, AvgCycle: 233,
- Park: false, OnStage: false, Harmony: true, CollectedBy: "alek",
+ Park: false, OnStage: false, Harmony: true, RobotDied: false, CollectedBy: "alek",
},
{
PreScouting: false, TeamNumber: "244",
@@ -1456,7 +1493,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 0, SpeakerAmplified: 3, AmpAmplified: 1,
NotesDropped: 0, Penalties: 1, TrapNote: false, Spotlight: false, AvgCycle: 120,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "kacey",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "kacey",
},
},
actions: []db.Action{
@@ -1520,7 +1557,7 @@
SpeakerAuto: 0, AmpAuto: 0, NotesDroppedAuto: 0, MobilityAuto: false,
Speaker: 0, Amp: 0, SpeakerAmplified: 3, AmpAmplified: 1,
NotesDropped: 0, Penalties: 1, TrapNote: false, Spotlight: false, AvgCycle: 120,
- Park: false, OnStage: true, Harmony: false, CollectedBy: "kacey",
+ Park: false, OnStage: true, Harmony: false, RobotDied: false, CollectedBy: "kacey",
},
}
diff --git a/scouting/www/entry/entry.component.css b/scouting/www/entry/entry.component.css
index 9c50ee0..cd208b9 100644
--- a/scouting/www/entry/entry.component.css
+++ b/scouting/www/entry/entry.component.css
@@ -20,5 +20,11 @@
}
#EndGame > div > label {
- padding: 0;
+ padding: 0px;
+}
+
+.button_row {
+ display: flex;
+ width: 90vw;
+ justify-content: space-between;
}
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index 122c415..5b461f8 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -75,7 +75,7 @@
| {
type: 'robotDeathAction';
timestamp?: number;
- robotOn: boolean;
+ robotDead: boolean;
}
| {
type: 'penaltyAction';
@@ -363,7 +363,7 @@
case 'robotDeathAction':
const robotDeathActionOffset =
- RobotDeathAction.createRobotDeathAction(builder, action.robotOn);
+ RobotDeathAction.createRobotDeathAction(builder, action.robotDead);
actionOffset = Action.createAction(
builder,
BigInt(action.timestamp || 0),
diff --git a/scouting/www/entry/entry.ng.html b/scouting/www/entry/entry.ng.html
index ea44ad3..22d2d27 100644
--- a/scouting/www/entry/entry.ng.html
+++ b/scouting/www/entry/entry.ng.html
@@ -123,7 +123,7 @@
<button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button>
<button
class="btn btn-danger"
- (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotOn: false});"
+ (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotDead: true});"
>
DEAD
</button>
@@ -183,15 +183,21 @@
selection and keep all buttons visible without scrolling on most devices.
-->
<div
- [ngClass]="{'d-grid': true, 'gap-3': autoPhase === true, 'gap-5': autoPhase === false}"
+ [ngClass]="{'d-grid': true, 'gap-4': autoPhase === true, 'gap-3': autoPhase === false}"
>
<button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button>
<button
class="btn btn-danger"
- (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotOn: false});"
+ (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotDead: true});"
>
DEAD
</button>
+ <button
+ class="btn btn-info"
+ (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kDROPPED});"
+ >
+ Dropped
+ </button>
<div *ngIf="!autoPhase" class="d-grid gap-1" style="padding: 0">
<div
style="
@@ -298,40 +304,54 @@
<button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button>
<button
class="btn btn-danger"
- (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotOn: false});"
+ (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotDead: true});"
>
DEAD
</button>
- <label>
- <input
- #park
- type="radio"
- id="option1"
- name="endgameaction"
- value="park"
- />
- Park
- </label>
- <label>
- <input
- #onStage
- type="radio"
- id="option2"
- name="endgameaction"
- value="onStage"
- />
- On Stage
- </label>
- <label>
- <input
- #harmony
- type="radio"
- id="option3"
- name="endgameaction"
- value="harmony"
- />
- Harmony
- </label>
+ <div class="button_row">
+ <label>
+ <input
+ #park
+ type="radio"
+ id="option1"
+ name="endgameaction"
+ value="park"
+ />
+ Park
+ </label>
+ <label>
+ <input
+ #onStage
+ type="radio"
+ id="option2"
+ name="endgameaction"
+ value="onStage"
+ />
+ On Stage
+ </label>
+ </div>
+ <div class="button_row">
+ <label>
+ <input
+ #harmony
+ type="radio"
+ id="option3"
+ name="endgameaction"
+ value="harmony"
+ />
+ Harmony
+ </label>
+ <label>
+ <input
+ #na
+ type="radio"
+ id="option2"
+ name="endgameaction"
+ value="na"
+ />
+ N/A
+ </label>
+ </div>
<label>
<input
#trapNote
@@ -352,6 +372,7 @@
/>
Spotlight
</label>
+
<div style="display: flex">
<h5>Penalties :</h5>
<button
@@ -381,13 +402,39 @@
</div>
<div *ngSwitchCase="'Dead'" id="Dead" class="container-fluid">
<h2>Robot is dead</h2>
- <div class="d-grid gap-2">
+ <div class="d-grid gap-3">
+ <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button>
+ <div style="display: flex">
+ <h5>Penalties :</h5>
+ <button
+ class="btn-light"
+ style="width: 40px; margin-right: 15px"
+ (click)="removePenalty()"
+ >
+ -
+ </button>
+ <p>{{this.penalties}}</p>
+ <button
+ class="btn-light"
+ style="width: 40px; margin-left: 15px"
+ (click)="addPenalty()"
+ >
+ +
+ </button>
+ </div>
<button
class="btn btn-success"
- (click)="changeSectionTo('Pickup'); addAction({type: 'robotDeathAction', robotOn: true}); "
+ (click)="changeSectionTo('Pickup'); addAction({type: 'robotDeathAction', robotDead: false}); "
>
Revive
</button>
+ <button
+ *ngIf="!autoPhase"
+ class="btn btn-info"
+ (click)="changeSectionTo('Review and Submit'); addPenalties(); addAction({type: 'endMatchAction', stageType: (park.checked ? StageType.kPARK : onStage.checked ? StageType.kON_STAGE : harmony.checked ? StageType.kHARMONY : StageType.kMISSING), trapNote: trapNote.checked, spotlight: spotlight.checked});"
+ >
+ End Match
+ </button>
</div>
</div>
<div *ngSwitchCase="'Review and Submit'" id="Review" class="container-fluid">
@@ -414,7 +461,7 @@
spotlight: {{action.spotlight}}
</span>
<span *ngSwitchCase="'robotDeathAction'">
- Robot on: {{action.robotOn}}
+ Robot dead: {{action.robotDead}}
</span>
<span *ngSwitchCase="'mobilityAction'">
Mobility: {{action.mobility}}