Skip to content

Commit

Permalink
fix(fdr2csv): refactor to unify fdr2csv, fix conversion bug (#9324)
Browse files Browse the repository at this point in the history
* feat(fdr2csv): refactor to unify fdr2csv, fix conversion bug

* chore: don't downgrade crate versions

* feat(fdr2csv): add option to get raw file version

* fix(fdr): fixed wrong storage of parameters

* feat(fdr2csv): -o no longer required when -r or -g are present

* fix(fdr2csv): correct description of parameters

---------

Co-authored-by: Andreas Guther <[email protected]>
  • Loading branch information
lukecologne and aguther committed Nov 2, 2024
1 parent c9cfe3c commit 2776100
Show file tree
Hide file tree
Showing 23 changed files with 426 additions and 1,185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ void FlightDataRecorder::writeConfiguration() {
// create structure
INIStructure iniStructure;
iniStructure["FLIGHT_DATA_RECORDER"]["ENABLED"] = idIsEnabled->get() == 1 ? "true" : "false";
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_FILES"] = idMaximumFileCount->get();
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_ENTRIES_PER_FILE"] = idMaximumSampleCounter->get();
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_FILES"] = std::to_string(static_cast<int>(idMaximumFileCount->get()));
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_ENTRIES_PER_FILE"] =
std::to_string(static_cast<int>(idMaximumSampleCounter->get()));

// write file
iniFile.write(iniStructure, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ void FlightDataRecorder::writeConfiguration() {
// create structure
INIStructure iniStructure;
iniStructure["FLIGHT_DATA_RECORDER"]["ENABLED"] = idIsEnabled->get() == 1 ? "true" : "false";
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_FILES"] = idMaximumFileCount->get();
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_ENTRIES_PER_FILE"] = idMaximumSampleCounter->get();
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_FILES"] = std::to_string(static_cast<int>(idMaximumFileCount->get()));
iniStructure["FLIGHT_DATA_RECORDER"]["MAXIMUM_NUMBER_OF_ENTRIES_PER_FILE"] =
std::to_string(static_cast<int>(idMaximumSampleCounter->get()));

// write file
iniFile.write(iniStructure, true);
Expand Down
31 changes: 9 additions & 22 deletions tools/fdr2csv/a32nx/Cargo.lock → tools/fdr2csv/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "fdr2csv_common"
name = "fdr2csv"
version = "0.1.0"
authors = ["FlyByWire Simulations"]
edition = "2021"
Expand Down
7 changes: 7 additions & 0 deletions tools/fdr2csv/a320_wrapper.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "../../fbw-a32nx/src/wasm/fbw_a320/src/model/AutopilotLaws_types.h"
#include "../../fbw-a32nx/src/wasm/fbw_a320/src/model/AutopilotStateMachine_types.h"
#include "../../fbw-a32nx/src/wasm/fbw_a320/src/model/Autothrust_types.h"
#include "../../fbw-a32nx/src/wasm/fbw_a320/src/model/ElacComputer_types.h"
#include "../../fbw-a32nx/src/wasm/fbw_a320/src/model/FacComputer_types.h"
#include "../../fbw-a32nx/src/wasm/fbw_a320/src/model/SecComputer_types.h"
#include "../../fbw-a32nx/src/wasm/fbw_a320/src/recording/RecordingDataTypes.h"
22 changes: 0 additions & 22 deletions tools/fdr2csv/a32nx/Cargo.toml

This file was deleted.

45 changes: 0 additions & 45 deletions tools/fdr2csv/a32nx/build.rs

This file was deleted.

216 changes: 0 additions & 216 deletions tools/fdr2csv/a32nx/src/main.rs

This file was deleted.

Loading

0 comments on commit 2776100

Please sign in to comment.