Use the new templated helper functions to simplify the code
This commit is contained in:
parent
1467a8a170
commit
2d684de929
1 changed files with 3 additions and 3 deletions
|
@ -86,7 +86,7 @@ int main()
|
|||
FG_DDS_FDM fdm;
|
||||
FG_DDS_GUI gui;
|
||||
|
||||
if (topics["gui"]->read((char*)&gui, sizeof(gui)) == sizeof(gui)) {
|
||||
if (topics["gui"]->read<FG_DDS_GUI>(gui)) {
|
||||
printf("=== [fgfdm_log] Received : ");
|
||||
printf("GUI Message:\n");
|
||||
printf(" version: %i\n", gui.version);
|
||||
|
@ -95,7 +95,7 @@ int main()
|
|||
printf(" dist_nm: %lf\n", gui.altitude);
|
||||
}
|
||||
|
||||
if (topics["fdm"]->read((char*)&fdm, sizeof(fdm)) == sizeof(fdm)) {
|
||||
if (topics["fdm"]->read<FG_DDS_FDM>(fdm)) {
|
||||
printf("=== [fgfdm_log] Received : ");
|
||||
printf("FDM Message:\n");
|
||||
printf(" version: %i\n", fdm.version);
|
||||
|
@ -104,7 +104,7 @@ int main()
|
|||
printf(" altitude: %lf\n", fdm.altitude);
|
||||
}
|
||||
|
||||
if (topics["ctrls"]->read((char*)&ctrls, sizeof(ctrls)) == sizeof(ctrls)) {
|
||||
if (topics["ctrls"]->read<FG_DDS_Ctrls>(ctrls)) {
|
||||
printf("=== [fgfdm_log] Received : ");
|
||||
printf("Ctrls Message:\n");
|
||||
printf(" version: %i\n", ctrls.version);
|
||||
|
|
Loading…
Add table
Reference in a new issue