mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-25 15:37:49 +00:00
AFSK RX works (only Bell202 for now)
AFSK RX always logs to file Removed frequency and bw settings from modem setup view Updated binary Bugfix: Binary display shifted one bit Bugfix: Frequency manager views freezing if SD card not present Bugfix: Menuview blinking arrow not showing up at the right position Bugfix: Freeze if console written to while it's hidden Broken: LCR TX, needs UI update
This commit is contained in:
@@ -336,13 +336,16 @@ public:
|
||||
class AFSKDataMessage : public Message {
|
||||
public:
|
||||
constexpr AFSKDataMessage(
|
||||
const uint_fast8_t byte
|
||||
const bool is_data,
|
||||
const uint32_t value
|
||||
) : Message { ID::AFSKData },
|
||||
byte { byte }
|
||||
is_data { is_data },
|
||||
value { value }
|
||||
{
|
||||
}
|
||||
|
||||
uint_fast8_t byte;
|
||||
bool is_data;
|
||||
uint32_t value;
|
||||
};
|
||||
|
||||
class ShutdownMessage : public Message {
|
||||
@@ -615,13 +618,22 @@ public:
|
||||
class AFSKRxConfigureMessage : public Message {
|
||||
public:
|
||||
constexpr AFSKRxConfigureMessage(
|
||||
const uint32_t bitrate
|
||||
const uint32_t baudrate,
|
||||
const uint32_t word_length,
|
||||
const uint32_t trigger_value,
|
||||
const bool trigger_word
|
||||
) : Message { ID::AFSKRxConfigure },
|
||||
bitrate(bitrate)
|
||||
baudrate(baudrate),
|
||||
word_length(word_length),
|
||||
trigger_value(trigger_value),
|
||||
trigger_word(trigger_word)
|
||||
{
|
||||
}
|
||||
|
||||
const uint32_t bitrate;
|
||||
const uint32_t baudrate;
|
||||
const uint32_t word_length;
|
||||
const uint32_t trigger_value;
|
||||
const bool trigger_word;
|
||||
};
|
||||
|
||||
class PWMRSSIConfigureMessage : public Message {
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
||||
#include "portapack_shared_memory.hpp"
|
||||
#include "message_queue.hpp"
|
||||
|
||||
struct JammerChannel {
|
||||
|
@@ -538,7 +538,7 @@ void Console::clear() {
|
||||
void Console::write(std::string message) {
|
||||
bool escape = false;
|
||||
|
||||
if (visible) {
|
||||
if (!hidden() && visible()) {
|
||||
const Style& s = style();
|
||||
const Font& font = s.font;
|
||||
const auto rect = screen_rect();
|
||||
@@ -546,7 +546,10 @@ void Console::write(std::string message) {
|
||||
|
||||
for (const auto c : message) {
|
||||
if (escape) {
|
||||
pen_color = term_colors[c & 7];
|
||||
if (c <= 15)
|
||||
pen_color = term_colors[c & 15];
|
||||
else
|
||||
pen_color = s.foreground;
|
||||
escape = false;
|
||||
} else {
|
||||
if (c == '\n') {
|
||||
@@ -570,7 +573,7 @@ void Console::write(std::string message) {
|
||||
}
|
||||
buffer = message;
|
||||
} else {
|
||||
buffer += message;
|
||||
if (buffer.size() < 256) buffer += message;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,7 +591,7 @@ void Console::on_show() {
|
||||
display.scroll_set_area(screen_r.top(), screen_r.bottom());
|
||||
display.scroll_set_position(0);
|
||||
clear();
|
||||
visible = true;
|
||||
//visible = true;
|
||||
}
|
||||
|
||||
void Console::on_hide() {
|
||||
@@ -596,9 +599,12 @@ void Console::on_hide() {
|
||||
* position?
|
||||
*/
|
||||
display.scroll_disable();
|
||||
//visible = false;
|
||||
}
|
||||
|
||||
void Console::crlf() {
|
||||
if (hidden() || !visible()) return;
|
||||
|
||||
const Style& s = style();
|
||||
const auto sr = screen_rect();
|
||||
const auto line_height = s.font.line_height();
|
||||
|
@@ -289,7 +289,7 @@ public:
|
||||
void on_hide() override;
|
||||
|
||||
private:
|
||||
bool visible = false;
|
||||
//bool visible = false;
|
||||
Point pos { 0, 0 };
|
||||
std::string buffer { };
|
||||
|
||||
|
Reference in New Issue
Block a user