Skip to content

Commit

Permalink
Merge: Have -dp2trk and -csv2trk generate Trick10 trks
Browse files Browse the repository at this point in the history
People who are writing tools to process Trick trk files
produced by koviz expect Trick10 trks.  This commit
changes the koviz generated trks from Trick07 to Trick10.

Bill M. wrote, "My preference is for all of the data we
provide to customers be in the Trick10 format".
  • Loading branch information
keithvetter committed Oct 10, 2024
2 parents 461bce3 + 0fd594a commit 5898152
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions koviz/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ bool writeTrk(const QString& ftrk, const QString& timeName,
TrickParameter timeParam;
timeParam.setName(timeName);
timeParam.setUnit("s");
timeParam.setType(TRICK_07_DOUBLE);
timeParam.setType(TRICK_10_DOUBLE);
timeParam.setSize(sizeof(double));
params << timeParam;

Expand Down Expand Up @@ -1671,7 +1671,7 @@ bool writeTrk(const QString& ftrk, const QString& timeName,
TrickParameter p;
p.setName(yParam);
p.setUnit(c->y()->unit());
p.setType(TRICK_07_DOUBLE);
p.setType(TRICK_10_DOUBLE);
p.setSize(sizeof(double));

// Make params/curves lists (lazily mapping params to curves)
Expand Down Expand Up @@ -1995,7 +1995,7 @@ bool convert2trk(const QString& csvFileName, const QString& trkFileName)
p.setUnit(unitString);
}
}
p.setType(TRICK_07_DOUBLE);
p.setType(TRICK_10_DOUBLE);
p.setSize(sizeof(double));
params.append(p);
}
Expand Down
2 changes: 1 addition & 1 deletion libkoviz/datamodel_trick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void TrickModel::writeTrkHeader(QDataStream &out,
// Trick-version-endian (10 bytes)
//
out.writeRawData("Trick-",6) ;
out.writeRawData("07",2) ;
out.writeRawData("10",2) ;
out.writeRawData("-",1) ;
out.writeRawData("L",1) ; // little endian

Expand Down

0 comments on commit 5898152

Please sign in to comment.