diff Discovery/Src/test_vpm.c @ 269:6e78137952af write-from-sim

cleanup: do not pass large struct by value Passing a huge struct by value is poor practice. Simply pass it by reference. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Tue, 23 Apr 2019 21:03:24 +0200
parents f9b17e898a7a
children 54d14bc2083c
line wrap: on
line diff
--- a/Discovery/Src/test_vpm.c	Tue Apr 23 17:41:20 2019 +0200
+++ b/Discovery/Src/test_vpm.c	Tue Apr 23 21:03:24 2019 +0200
@@ -527,7 +527,7 @@
                 input.events.gasChange = 0;
                 input.events.info_GasChange = 0;
             }
-            logbook_writeSample(input);
+            logbook_writeSample(&input);
     }
         volatile SLogbookHeader* logbookHeader = logbook_getCurrentHeader();
 
@@ -590,7 +590,7 @@
                         input.events.gasChange = 0;
                         input.events.info_GasChange = 0;
                 }
-            logbook_writeSample(input);
+            logbook_writeSample(&input);
     }
     volatile SLogbookHeader* logbookHeader = logbook_getCurrentHeader();
 
@@ -652,7 +652,7 @@
                         input.events.gasChange = 0;
                         input.events.info_GasChange = 0;
                 }
-            logbook_writeSample(input);
+            logbook_writeSample(&input);
     }
     volatile SLogbookHeader* logbookHeader = logbook_getCurrentHeader();
 
@@ -708,7 +708,7 @@
                     input.lifeData.depth_meter = 0;
             }
 
-            logbook_writeSample(input);
+            logbook_writeSample(&input);
     }
     volatile SLogbookHeader* logbookHeader = logbook_getCurrentHeader();
     logbookHeader->total_diveTime_seconds = input.lifeData.dive_time_seconds;