mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-02 18:21:48 +00:00
Jammer bugfix: now produces all the right channels
This commit is contained in:
@@ -706,13 +706,13 @@ public:
|
||||
class JammerConfigureMessage : public Message {
|
||||
public:
|
||||
constexpr JammerConfigureMessage(
|
||||
const uint32_t test
|
||||
const bool run
|
||||
) : Message { ID::JammerConfigure },
|
||||
test(test)
|
||||
run(run)
|
||||
{
|
||||
}
|
||||
|
||||
const uint32_t test;
|
||||
const bool run;
|
||||
};
|
||||
|
||||
class DTMFTXConfigMessage : public Message {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "portapack_shared_memory.hpp"
|
||||
#include "message_queue.hpp"
|
||||
|
||||
struct JammerRange {
|
||||
struct JammerChannel {
|
||||
bool enabled;
|
||||
uint64_t center;
|
||||
uint32_t width;
|
||||
@@ -62,7 +62,7 @@ struct SharedMemory {
|
||||
|
||||
union {
|
||||
ToneData tones_data;
|
||||
JammerRange jammer_ranges[9];
|
||||
JammerChannel jammer_channels[9];
|
||||
uint8_t data[512];
|
||||
} bb_data { { { { 0, 0 } }, 0, { 0 } } };
|
||||
};
|
||||
|
||||
@@ -585,7 +585,7 @@ bool Checkbox::set_value(const bool value) {
|
||||
set_dirty();
|
||||
|
||||
if( on_select ) {
|
||||
on_select(*this);
|
||||
on_select(*this, value_);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ bool Checkbox::on_touch(const TouchEvent event) {
|
||||
value_ = not value_;
|
||||
set_dirty();
|
||||
if( on_select ) {
|
||||
on_select(*this);
|
||||
on_select(*this, value_);
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ private:
|
||||
|
||||
class Checkbox : public Widget {
|
||||
public:
|
||||
std::function<void(Checkbox&)> on_select { };
|
||||
std::function<void(Checkbox&, bool)> on_select { };
|
||||
|
||||
Checkbox(Point parent_pos, size_t length, std::string text, bool small);
|
||||
Checkbox(
|
||||
|
||||
Reference in New Issue
Block a user