Spectrum streaming control, spectrum attributes back in each frame.

TODO: This feels kinda complex, and there's some repeated Processor code that needs to be refactored into a base class.
This commit is contained in:
Jared Boone
2016-01-10 10:42:20 -08:00
parent 0647f26707
commit d821afc60d
10 changed files with 101 additions and 29 deletions

View File

@@ -66,6 +66,10 @@ void NarrowbandFMAudio::on_message(const Message* const message) {
configure(*reinterpret_cast<const NBFMConfigureMessage*>(message));
break;
case Message::ID::SpectrumStreamingConfig:
streaming_config(*reinterpret_cast<const SpectrumStreamingConfigMessage*>(message));
break;
default:
break;
}
@@ -99,3 +103,11 @@ void NarrowbandFMAudio::configure(const NBFMConfigureMessage& message) {
configured = true;
}
void NarrowbandFMAudio::streaming_config(const SpectrumStreamingConfigMessage& message) {
if( message.mode == SpectrumStreamingConfigMessage::Mode::Running ) {
channel_spectrum.start();
} else {
channel_spectrum.stop();
}
}