# This is a combination of 2 commits.

# The first commit's message is:

Updated RDS transmitter: flags, PI and date/time

Merging baseband audio tone generators

Merging DTMF baseband with "tones" baseband

Added stealth transmit mode

App flash section bumped to 512k
RX and TX LEDs are now used
Play dead should work again, added login option
Morse frame gen. for letters and fox hunt codes
Merged EPAR with Xylos
Made EPAR use encoders for frame gen.
Moved OOK encoders data in encoders.hpp
Simplified about screen, ui_about_demo.* files are still there

BHT city DB, keywords removed

BHT cities DB, keywords removed

Update README.md

RDS radiotext and time group generators

# This is the 2nd commit message:

Update README.md
This commit is contained in:
furrtek
2016-12-09 18:21:47 +01:00
parent 0b13283d5d
commit 6bcb7dc1b1
91 changed files with 3867 additions and 2535 deletions
+21 -10
View File
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
*
* This file is part of PortaPack.
*
@@ -68,7 +69,7 @@ public:
TXDone = 20,
Retune = 21,
CCIRConfigure = 22,
TonesConfigure = 22,
AFSKConfigure = 23,
PWMRSSIConfigure = 24,
OOKConfigure = 25,
@@ -498,7 +499,8 @@ public:
{
}
int n = 0;
uint32_t progress = 0;
bool done = false;
};
@@ -521,19 +523,28 @@ public:
const int32_t avg;
};
class CCIRConfigureMessage : public Message {
class TonesConfigureMessage : public Message {
public:
constexpr CCIRConfigureMessage(
const uint32_t samples_per_tone,
const uint16_t tone_count
) : Message { ID::CCIRConfigure },
samples_per_tone(samples_per_tone),
tone_count(tone_count)
constexpr TonesConfigureMessage(
const uint32_t fm_delta,
const uint32_t pre_silence,
const uint16_t tone_count,
const bool dual_tone,
const bool audio_out
) : Message { ID::TonesConfigure },
fm_delta(fm_delta),
pre_silence(pre_silence),
tone_count(tone_count),
dual_tone(dual_tone),
audio_out(audio_out)
{
}
const uint32_t samples_per_tone;
const uint32_t fm_delta;
const uint32_t pre_silence;
const uint16_t tone_count;
const bool dual_tone;
const bool audio_out;
};
class RDSConfigureMessage : public Message {
@@ -184,6 +184,14 @@ void set_playdead_sequence(const uint32_t new_value) {
data->playdead_sequence = new_value;
}
bool stealth_mode() {
return ((data->ui_config >> 3) & 1) ? true : false;
}
void set_stealth_mode(const bool new_value) {
data->ui_config = (data->ui_config & ~0b1000) | ((new_value & 1) << 3);
}
uint32_t ui_config() {
uint8_t bloff_value;
@@ -210,7 +218,7 @@ uint16_t ui_config_bloff() {
}
void set_config_textentry(uint8_t new_value) {
data->ui_config = (data->ui_config & ~0b1100) | ((new_value & 1) << 2);
data->ui_config = (data->ui_config & ~0b100) | ((new_value & 1) << 2);
}
uint8_t ui_config_textentry() {
@@ -65,6 +65,9 @@ void set_playing_dead(const uint32_t new_value);
uint32_t playdead_sequence();
void set_playdead_sequence(const uint32_t new_value);
bool stealth_mode();
void set_stealth_mode(const bool new_value);
uint32_t ui_config();
void set_ui_config(const uint32_t new_value);
+18 -2
View File
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
*
* This file is part of PortaPack.
*
@@ -25,6 +26,7 @@
#include <cstdint>
#include <cstddef>
#include "portapack_shared_memory.hpp"
#include "message_queue.hpp"
struct JammerRange {
@@ -34,6 +36,17 @@ struct JammerRange {
uint32_t duration;
};
struct ToneDef {
uint32_t delta;
uint32_t duration;
};
struct ToneData {
ToneDef tone_defs[32];
uint32_t silence;
uint8_t message[128];
};
/* NOTE: These structures must be located in the same location in both M4 and M0 binaries */
struct SharedMemory {
static constexpr size_t application_queue_k = 11;
@@ -47,8 +60,11 @@ struct SharedMemory {
char m4_panic_msg[32] { 0 };
// struct tx_data union for 9x JammerRange ?
uint8_t tx_data[512] { 0 };
union {
ToneData tones_data;
JammerRange jammer_ranges[9];
uint8_t data[512];
} bb_data;
};
extern SharedMemory& shared_memory;
+2 -2
View File
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
* Copyright (C) 2016 Furrtek
*
* This file is part of PortaPack.
*
@@ -77,10 +78,9 @@ constexpr image_tag_t image_tag_jammer { 'P', 'J', 'A', 'M' };
constexpr image_tag_t image_tag_audio_tx { 'P', 'A', 'T', 'X' };
constexpr image_tag_t image_tag_afsk { 'P', 'A', 'F', 'S' };
constexpr image_tag_t image_tag_epar { 'P', 'E', 'P', 'R' };
constexpr image_tag_t image_tag_xylos { 'P', 'X', 'Y', 'L' };
constexpr image_tag_t image_tag_tones { 'P', 'T', 'O', 'N' };
constexpr image_tag_t image_tag_rds { 'P', 'R', 'D', 'S' };
constexpr image_tag_t image_tag_ook { 'P', 'O', 'O', 'K' };
constexpr image_tag_t image_tag_dtmf_tx { 'P', 'D', 'T', 'X' };
constexpr image_tag_t image_tag_adsb_tx { 'P', 'A', 'D', 'S' };
constexpr image_tag_t image_tag_hackrf { 'H', 'R', 'F', '1' };
+18 -16
View File
@@ -250,6 +250,12 @@ void View::remove_child(Widget* const widget) {
}
}
void View::remove_children(const std::vector<Widget*>& children) {
for(auto child : children) {
remove_child(child);
}
}
const std::vector<Widget*>& View::children() const {
return children_;
}
@@ -564,13 +570,17 @@ void Checkbox::set_text(const std::string value) {
set_dirty();
}
/*std::string Checkbox::text() const {
return text_;
}*/
void Checkbox::set_value(const bool value) {
bool Checkbox::set_value(const bool value) {
value_ = value;
if( on_select ) {
on_select(*this);
return true;
}
set_dirty();
return false;
}
bool Checkbox::value() const {
@@ -616,15 +626,8 @@ void Checkbox::paint(Painter& painter) {
}
bool Checkbox::on_key(const KeyEvent key) {
if( key == KeyEvent::Select ) {
value_ = not value_;
set_dirty();
if( on_select ) {
on_select(*this);
return true;
}
}
if( key == KeyEvent::Select )
return set_value(not value_);
return false;
}
@@ -714,8 +717,7 @@ bool Button::on_key(const KeyEvent key) {
}
} else {
if( on_dir ) {
on_dir(*this, key);
return false;
return on_dir(*this, key);
}
}
+9 -2
View File
@@ -29,6 +29,7 @@
#include "ui_focus.hpp"
#include "radio.hpp"
#include "portapack.hpp"
#include "utility.hpp"
#include <memory>
@@ -161,6 +162,7 @@ public:
void add_child(Widget* const widget);
void add_children(const std::vector<Widget*>& children);
void remove_child(Widget* const widget);
void remove_children(const std::vector<Widget*>& children);
const std::vector<Widget*>& children() const override;
virtual std::string title() const;
@@ -264,7 +266,7 @@ public:
void set_text(const std::string value);
// std::string text() const;
void set_value(const bool value);
bool set_value(const bool value);
bool value() const;
void paint(Painter& painter) override;
@@ -281,7 +283,7 @@ private:
class Button : public Widget {
public:
std::function<void(Button&)> on_select;
std::function<void(Button&,KeyEvent)> on_dir;
std::function<bool(Button&,KeyEvent)> on_dir;
std::function<void(Button&)> on_highlight;
Button(Rect parent_rect, std::string text);
@@ -354,6 +356,11 @@ public:
ImageOptionsField(Rect parent_rect, options_t options);
ImageOptionsField(
) : ImageOptionsField { { }, { } }
{
}
void set_options(options_t new_options);
size_t selected_index() const;