Skip to content

Commit

Permalink
Revert "Fixed message buffer allocations."
Browse files Browse the repository at this point in the history
This reverts commit 3cb1d61.
  • Loading branch information
zynaptic committed Jun 20, 2018
1 parent 3cb1d61 commit eb16db3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions gnuradio/gr-scratch_radio/lib/message_source_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ namespace gr {
if ((!d_source) || (!d_source->is_open ())) {
// TODO: How do we handle missing files?
}
d_msg_buffer = new uint8_t [MSG_BUFFER_LEN];

// Determine the output buffer threshold required to limit the
// latency imposed by the output buffer.
Expand All @@ -70,7 +69,6 @@ namespace gr {
d_source->close();
}
delete d_source;
delete[] d_msg_buffer;
}
}

Expand Down
2 changes: 1 addition & 1 deletion gnuradio/gr-scratch_radio/lib/message_source_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace gr {
int d_msg_byte_count;
int d_msg_length;
std::ifstream* d_source;
uint8_t* d_msg_buffer;
uint8_t d_msg_buffer[MSG_BUFFER_LEN];

bool m_poll_for_message(void);

Expand Down
2 changes: 1 addition & 1 deletion gnuradio/gr-scratch_radio/lib/ook_modulator_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <scratch_radio/ook_modulator.h>

#define OUTPUT_LATENCY 250
#define OUTPUT_LATENCY 1000

namespace gr {
namespace scratch_radio {
Expand Down
2 changes: 0 additions & 2 deletions gnuradio/gr-scratch_radio/lib/simple_deframer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ namespace gr {
d_header = 0;
d_msg_byte_count = 0;
d_msg_length = 0;
d_msg_buffer = new uint8_t [256];
d_checksum_0 = 0;
d_checksum_1 = 0;
d_idle_count = 0;
Expand All @@ -61,7 +60,6 @@ namespace gr {
*/
simple_deframer_impl::~simple_deframer_impl()
{
delete[] d_msg_buffer;
}

void
Expand Down
2 changes: 1 addition & 1 deletion gnuradio/gr-scratch_radio/lib/simple_deframer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace gr {
uint32_t d_header;
int d_msg_byte_count;
int d_msg_length;
uint8_t* d_msg_buffer;
uint8_t d_msg_buffer[256];
uint32_t d_checksum_0;
uint32_t d_checksum_1;
int d_idle_count;
Expand Down

0 comments on commit eb16db3

Please sign in to comment.