Create baseband statistics messages on stack.

Code size shrank ~200 bytes with this change.
This commit is contained in:
Jared Boone 2015-12-10 11:57:57 -08:00
parent 3bed016128
commit 98abc4bba8
2 changed files with 2 additions and 3 deletions

View File

@ -94,6 +94,7 @@ void BasebandProcessor::fill_audio_buffer(const buffer_s16_t& audio) {
}
void BasebandProcessor::post_channel_stats_message(const ChannelStatistics& statistics) {
ChannelStatisticsMessage channel_stats_message;
channel_stats_message.statistics = statistics;
shared_memory.application_queue.push(channel_stats_message);
}
@ -117,6 +118,7 @@ void BasebandProcessor::feed_audio_stats(const buffer_s16_t& audio) {
}
void BasebandProcessor::post_audio_stats_message(const AudioStatistics& statistics) {
AudioStatisticsMessage audio_stats_message;
audio_stats_message.statistics = statistics;
shared_memory.application_queue.push(audio_stats_message);
}

View File

@ -62,10 +62,7 @@ private:
BlockDecimator<256> channel_spectrum_decimator { 4 };
ChannelStatsCollector channel_stats;
ChannelStatisticsMessage channel_stats_message;
AudioStatsCollector audio_stats;
AudioStatisticsMessage audio_stats_message;
void post_channel_stats_message(const ChannelStatistics& statistics);
void post_channel_spectrum_message(const buffer_c16_t& data);