mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Baseband: Pass unhandled messages to baseband thread, processor.
This commit is contained in:
parent
07cd99d85d
commit
fd612dc207
@ -38,6 +38,7 @@ public:
|
|||||||
|
|
||||||
virtual void execute(const buffer_c8_t& buffer) = 0;
|
virtual void execute(const buffer_c8_t& buffer) = 0;
|
||||||
|
|
||||||
|
virtual void on_message(const Message* const) { };
|
||||||
virtual void on_update_spectrum() { };
|
virtual void on_update_spectrum() { };
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -68,6 +68,12 @@ void BasebandThread::set_configuration(const BasebandConfiguration& new_configur
|
|||||||
baseband_configuration = new_configuration;
|
baseband_configuration = new_configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BasebandThread::on_message(const Message* const message) {
|
||||||
|
if( baseband_processor ) {
|
||||||
|
baseband_processor->on_message(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BasebandThread::on_update_spectrum() {
|
void BasebandThread::on_update_spectrum() {
|
||||||
if( baseband_processor ) {
|
if( baseband_processor ) {
|
||||||
baseband_processor->on_update_spectrum();
|
baseband_processor->on_update_spectrum();
|
||||||
|
@ -39,6 +39,7 @@ public:
|
|||||||
|
|
||||||
void set_configuration(const BasebandConfiguration& new_configuration);
|
void set_configuration(const BasebandConfiguration& new_configuration);
|
||||||
|
|
||||||
|
void on_message(const Message* const message);
|
||||||
void on_update_spectrum();
|
void on_update_spectrum();
|
||||||
|
|
||||||
// This getter should die, it's just here to leak information to code that
|
// This getter should die, it's just here to leak information to code that
|
||||||
|
@ -192,8 +192,8 @@ private:
|
|||||||
request_stop();
|
request_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_message_default(const Message* const) {
|
void on_message_default(const Message* const message) {
|
||||||
// TODO: Pass to active baseband processor.
|
baseband_thread.on_message(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_spectrum() {
|
void handle_spectrum() {
|
||||||
|
Loading…
Reference in New Issue
Block a user