Module loading should work again

Modules won't load if already loaded (dirty footprint hack)
This commit is contained in:
furrtek
2016-01-05 20:17:55 +01:00
parent 58367839a6
commit 496c77fe3e
19 changed files with 127 additions and 34 deletions
+13 -2
View File
@@ -485,7 +485,6 @@ void wait_for_switch(void) {
ReadyForSwitchMessage message;
shared_memory.application_queue.push(message);
(*loop_ptr)();
return;
}
int main(void) {
@@ -496,6 +495,18 @@ int main(void) {
EventDispatcher event_dispatcher;
auto& message_handlers = event_dispatcher.message_handlers();
message_handlers.register_handler(Message::ID::ModuleID,
[&message_handlers](Message* p) {
ModuleIDMessage reply;
auto message = static_cast<ModuleIDMessage*>(p);
if (message->query == true) { // Shouldn't be needed
memcpy(reply.md5_signature, (const void *)(0x10087FF0), 16);
reply.query = false;
shared_memory.application_queue.push(reply);
}
}
);
message_handlers.register_handler(Message::ID::BasebandConfiguration,
[&message_handlers](const Message* const p) {
@@ -538,7 +549,7 @@ int main(void) {
baseband_thread.baseband_processor = new XylosProcessor();
break;
case 0xFF:
case SWITCH:
wait_for_switch();
default:
+3 -4
View File
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
*
*
* This file is part of PortaPack.
*
* This program is free software; you can redistribute it and/or modify
@@ -45,11 +45,10 @@ void XylosProcessor::execute(buffer_c8_t buffer) {
digit = shared_memory.xylosdata[byte_pos++];
}
if (!digit) {
if (digit == 0xFF) {
message.n = 25; // End of message code
shared_memory.xylos_transmit_done = true;
shared_memory.application_queue.push(message);
digit = 0;
}
sample_count = 0;
+2 -2
View File
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
*
*
* This file is part of PortaPack.
*
* This program is free software; you can redistribute it and/or modify