mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[sim] GUI: Fix game message string lifetime (#8874)
Fixes an issue where game data can't be set.
This commit is contained in:
@@ -1294,8 +1294,9 @@ void FMSSimModel::UpdateHAL() {
|
||||
HALSIM_SetDriverStationRobotMode(
|
||||
static_cast<HAL_RobotMode>(m_robotMode.GetValue()));
|
||||
HALSIM_SetDriverStationMatchTime(m_matchTime.GetValue());
|
||||
auto str = wpi::util::make_string(m_gameMessage.GetValue());
|
||||
HALSIM_SetGameDataString(&str);
|
||||
std::string str = m_gameMessage.GetValue();
|
||||
auto gameData = wpi::util::make_string(str);
|
||||
HALSIM_SetGameDataString(&gameData);
|
||||
HALSIM_SetDriverStationDsAttached(m_dsAttached.GetValue());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user