Jammer bugfix: now produces all the right channels

This commit is contained in:
furrtek
2017-01-17 14:27:37 +00:00
parent 7cb38f858e
commit f0fbc356ad
16 changed files with 120 additions and 121 deletions

View File

@@ -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 {

View File

@@ -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 } } };
};

View File

@@ -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;

View File

@@ -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(