diff --git a/soccer/src/soccer/game_state.hpp b/soccer/src/soccer/game_state.hpp index 439b09ee2da..9df64ed6096 100644 --- a/soccer/src/soccer/game_state.hpp +++ b/soccer/src/soccer/game_state.hpp @@ -142,7 +142,7 @@ struct PlayState { } static PlayState playing() { return PlayState(State::Playing, Restart::None, false, {}); } static PlayState penalty_playing(bool ours) { - return PlayState(State::PenaltyPlaying, Restart::Penalty, ours, {}); + return PlayState(State::PenaltyPlaying, Restart::None, ours, {}); } bool operator==(const PlayState& other) const { diff --git a/soccer/src/soccer/ui/main_window.cpp b/soccer/src/soccer/ui/main_window.cpp index 3b2a59a9d36..1ddb5049a42 100644 --- a/soccer/src/soccer/ui/main_window.cpp +++ b/soccer/src/soccer/ui/main_window.cpp @@ -1141,13 +1141,15 @@ void MainWindow::on_fastReady_clicked() { void MainWindow::on_fastForceStart_clicked() { send_quick_command(PlayState::playing()); } void MainWindow::on_fastKickoffBlue_clicked() { - send_quick_command(PlayState::setup_kickoff(context_->blue_team)); - queued_command_ = PlayState::ready_kickoff(context_->blue_team); + PlayState setup_kickoff_state = PlayState::setup_kickoff(context_->blue_team); + send_quick_command(setup_kickoff_state); + queued_command_ = setup_kickoff_state.advanced_from_normal_start(); } void MainWindow::on_fastKickoffYellow_clicked() { - send_quick_command(PlayState::setup_kickoff(!context_->blue_team)); - queued_command_ = PlayState::ready_kickoff(context_->blue_team); + PlayState setup_kickoff_state = PlayState::setup_kickoff(!context_->blue_team); + send_quick_command(setup_kickoff_state); + queued_command_ = setup_kickoff_state.advanced_from_normal_start(); } void MainWindow::on_fastBlue_clicked() { @@ -1158,6 +1160,18 @@ void MainWindow::on_fastYellow_clicked() { send_quick_command(PlayState::ready_free_kick(!context_->blue_team)); } +void MainWindow::on_fastPenaltyBlue_clicked() { + PlayState setup_penalty_state = PlayState::setup_penalty(context_->blue_team); + send_quick_command(setup_penalty_state); + queued_command_ = setup_penalty_state.advanced_from_normal_start(); +} + +void MainWindow::on_fastPenaltyYellow_clicked() { + PlayState setup_penalty_state = PlayState::setup_penalty(!context_->blue_team); + send_quick_command(setup_penalty_state); + queued_command_ = setup_penalty_state.advanced_from_normal_start(); +} + bool MainWindow::live() { return !_playbackRate; } void MainWindow::updateDebugLayers(const LogFrame& frame) { // Check if any debug layers have been added diff --git a/soccer/src/soccer/ui/main_window.hpp b/soccer/src/soccer/ui/main_window.hpp index cb708dd6111..61cf24a6c40 100644 --- a/soccer/src/soccer/ui/main_window.hpp +++ b/soccer/src/soccer/ui/main_window.hpp @@ -163,6 +163,8 @@ private Q_SLOTS: void on_fastKickoffYellow_clicked(); void on_fastBlue_clicked(); void on_fastYellow_clicked(); + void on_fastPenaltyBlue_clicked(); + void on_fastPenaltyYellow_clicked(); // Robot Position Dropdowns and Reset Buttons void on_robotPosition_0_currentIndexChanged(int value); diff --git a/soccer/src/soccer/ui/qt/MainWindow.ui b/soccer/src/soccer/ui/qt/MainWindow.ui index 7f63b4c2db3..8b1a3a22d86 100644 --- a/soccer/src/soccer/ui/qt/MainWindow.ui +++ b/soccer/src/soccer/ui/qt/MainWindow.ui @@ -263,6 +263,47 @@ + + + + + + + :/icons/penalty_blue.svg:/icons/penalty_blue.svg + + + + 24 + 24 + + + + true + + + + + + + + + + + :/icons/penalty_yellow.svg:/icons/penalty_yellow.svg + + + + 24 + 24 + + + + true + + + + + @@ -1813,7 +1854,6 @@ - Joystick @@ -1975,7 +2015,7 @@ 671 - + 11 @@ -2058,7 +2098,6 @@ - @@ -2129,7 +2168,6 @@ - @@ -2200,7 +2238,6 @@ - @@ -2271,7 +2308,6 @@ - @@ -2342,7 +2378,6 @@ - @@ -2413,7 +2448,6 @@ - @@ -2484,7 +2518,6 @@ - @@ -2555,7 +2588,6 @@ - @@ -2626,7 +2658,6 @@ - @@ -2697,7 +2728,6 @@ - @@ -2768,7 +2798,6 @@ - @@ -2839,7 +2868,6 @@ - @@ -2910,7 +2938,6 @@ - @@ -2981,7 +3008,6 @@ - @@ -3052,7 +3078,6 @@ - @@ -3123,7 +3148,6 @@ - @@ -3140,7 +3164,7 @@ 0 0 1331 - 24 + 25 diff --git a/soccer/src/soccer/ui/qt/main_icons.qrc b/soccer/src/soccer/ui/qt/main_icons.qrc index 5a300de1762..f1088ecf2c6 100644 --- a/soccer/src/soccer/ui/qt/main_icons.qrc +++ b/soccer/src/soccer/ui/qt/main_icons.qrc @@ -5,6 +5,8 @@ force_start.svg kickoff_blue.svg kickoff_yellow.svg + penalty_blue.svg + penalty_yellow.svg direct_blue.svg direct_yellow.svg indirect_blue.svg diff --git a/soccer/src/soccer/ui/qt/penalty_blue.svg b/soccer/src/soccer/ui/qt/penalty_blue.svg new file mode 100644 index 00000000000..6b3f1122622 --- /dev/null +++ b/soccer/src/soccer/ui/qt/penalty_blue.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + P + + diff --git a/soccer/src/soccer/ui/qt/penalty_yellow.svg b/soccer/src/soccer/ui/qt/penalty_yellow.svg new file mode 100644 index 00000000000..8e72b5e7af6 --- /dev/null +++ b/soccer/src/soccer/ui/qt/penalty_yellow.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + P + +