mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 17:25:00 +01:00
feat(blackbox): the black box on its own, writing the tapes of the user's vehicles at the end
"blackbox yes" in eu07.ini records the black box with the physics logs on or off, "blackbox no" never; with no entry it goes with "physicslog yes" as before. With the physics logs off, the recorder keeps the line of the physics log of the driver the user is with, every 0.05 s, and writes it to physicslog/<vehicle>.dat when the recording closes: the speed recorder's tape of the vehicles the user was in, without every vehicle keeping a log open and written twenty times a second. The line and the header of the log are made by one function of the driver, which its own log writes too, and the file is opened the same way, so the two are the same to the byte: the readers of these logs (the old Hasler tape viewer, the starter) read them as before.
This commit is contained in:
@@ -540,7 +540,9 @@ bool global_settings::ConfigParseSimulation(cParser& Parser, const std::string&
|
||||
|
||||
if (token == "blackbox")
|
||||
{
|
||||
ParseOne(Parser, BlackBox);
|
||||
bool blackbox{false};
|
||||
ParseOne(Parser, blackbox);
|
||||
BlackBox = blackbox;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1735,7 +1737,9 @@ global_settings::export_as_text( std::ostream &Output ) const {
|
||||
export_as_text( Output, "sound.volume.ambient", EnvironmentAmbientVolume );
|
||||
export_as_text( Output, "sound.asyncload", AudioAsyncLoad );
|
||||
export_as_text( Output, "physicslog", WriteLogFlag );
|
||||
export_as_text( Output, "blackbox", BlackBox );
|
||||
if( BlackBox ) {
|
||||
export_as_text( Output, "blackbox", *BlackBox );
|
||||
}
|
||||
export_as_text( Output, "fullphysics", FullPhysics );
|
||||
export_as_text( Output, "debuglog", iWriteLogEnabled );
|
||||
export_as_text( Output, "multiplelogs", MultipleLogs );
|
||||
|
||||
@@ -113,7 +113,9 @@ struct global_settings {
|
||||
bool priorityLoadText3D{false}; // ladowanie T3D priorytetowo
|
||||
int iWriteLogEnabled{ 3 }; // maska bitowa: 1-zapis do pliku, 2-okienko, 4-nazwy torów
|
||||
bool MultipleLogs{ false };
|
||||
bool BlackBox{ true }; // with the physics logs on, the black box of the session is written as well (blackbox_doc.md)
|
||||
// the black box of the session (blackbox_doc.md): "blackbox yes" writes it whatever the physics logs, "blackbox no"
|
||||
// never, and with no entry it is written along with the physics logs
|
||||
std::optional<bool> BlackBox;
|
||||
bool ShowSystemConsole{ false }; // toggle visibility of the OS console window with log output
|
||||
unsigned int DisabledLogTypes{ 0 };
|
||||
bool ParserLogIncludes{ true };
|
||||
|
||||
Reference in New Issue
Block a user