Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Achim Morschhauser
GeomagLogger
Commits
3aa80943
Commit
3aa80943
authored
Apr 19, 2021
by
Thomas Edwards
Browse files
Removed debug statements and intentional memory leak
parent
79763b83
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Filter_Obs.cpp
View file @
3aa80943
...
...
@@ -367,17 +367,17 @@ int Filter_Obs::lowpass_PLASMON_1Hz(buffer_obs* buffer_in,
// --------------------------------------------------------------
// Degbugging monitoring info
// --------------------------------------------------------------
std
::
cerr
<<
"-----------------------------------"
<<
std
::
endl
;
//
std::cerr << "-----------------------------------" << std::endl;
// timestamp=tofilter1.back()->get_time("%Y-%m-%d %H:%M:%S",true);
// Determine number of blocks
float
num_blocks
=
(
elapsed_time_last_block
/
(
1e9
/
16.
));
total_blocks
+=
num_blocks
;
// Debug printing
std
::
cerr
<<
"Total blocks: "
<<
total_blocks
<<
std
::
endl
;
std
::
cerr
<<
"Data in que: "
<<
tofilter1
.
size
()
<<
std
::
endl
;
std
::
cerr
<<
"Blocks*8: "
<<
round
(
8
*
(
total_blocks
))
<<
std
::
endl
;
//
//
Debug printing
//
std::cerr << "Total blocks: " << total_blocks << std::endl;
//
std::cerr << "Data in que: " << tofilter1.size() << std::endl;
//
std::cerr << "Blocks*8: " << round(8*(total_blocks)) << std::endl;
// --------------------------------------------------------------
// Given the elapsed time, can we run some number of filters to
...
...
@@ -442,11 +442,11 @@ int Filter_Obs::lowpass_PLASMON_1Hz(buffer_obs* buffer_in,
// fix total blocks
total_blocks
=
total_blocks
*
((
1.
-
(
points_to_drop
/
float
(
tofilter1
.
size
()))));
//
//
Drop the oldest data points, as determined by the oldest block
//
for (int ix = 0; ix < points_to_drop; ix++) {
//
delete(tofilter1[ix]);
//
}
//
tofilter1.erase(tofilter1.begin(), tofilter1.begin() + points_to_drop);
// Drop the oldest data points, as determined by the oldest block
for
(
int
ix
=
0
;
ix
<
points_to_drop
;
ix
++
)
{
delete
(
tofilter1
[
ix
]);
}
tofilter1
.
erase
(
tofilter1
.
begin
(),
tofilter1
.
begin
()
+
points_to_drop
);
// // Debug printing
// std::cerr << "Total blocks (post filter): " << total_blocks << std::endl;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment