mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Fixed messup after last squashed commits
This commit is contained in:
parent
6bcb7dc1b1
commit
9470028308
@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
|
// Use firmware/tools/make_bitmap.py !
|
||||||
|
|
||||||
static constexpr uint8_t bitmap_stealth_data[] = {
|
static constexpr uint8_t bitmap_stealth_data[] = {
|
||||||
0x00, 0x00,
|
0x00, 0x00,
|
||||||
0x00, 0x00,
|
0x00, 0x00,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Bitmaps generated with:
|
// Color bitmaps generated with:
|
||||||
// Gimp image > indexed colors (16), then "xxd -i *.bmp"
|
// Gimp image > indexed colors (16), then "xxd -i *.bmp"
|
||||||
|
|
||||||
//TEST: Imperial in whipcalc
|
//TEST: Imperial in whipcalc
|
||||||
|
@ -81,18 +81,10 @@ void make_4A_group(uint32_t blocks[], const uint16_t PI_code, const bool TP, con
|
|||||||
const uint8_t hour, const uint8_t minute, const int8_t local_offset) {
|
const uint8_t hour, const uint8_t minute, const int8_t local_offset) {
|
||||||
uint32_t L = 0;
|
uint32_t L = 0;
|
||||||
uint32_t day_code;
|
uint32_t day_code;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// 57723
|
|
||||||
|
|
||||||
if ((month == 1) || (month == 2)) L = 1;
|
if ((month == 1) || (month == 2)) L = 1;
|
||||||
|
|
||||||
day_code = 14956 + day + (uint32_t)((float)(year - 1900 - L) * 365.25) + uint16_t((float)((month + 1) + L * 12) * 30.6001);
|
day_code = 14956 + day + (uint32_t)((float)(year - 1900 - L) * 365.25) + uint16_t((float)((month + 1) + L * 12) * 30.6001);
|
||||||
=======
|
|
||||||
if ((month == 1) || (month == 2)) L = 1;
|
|
||||||
|
|
||||||
day_code = 14956 + day + (uint32_t)((float)(year - L) * 365.25) + uint16_t(((month + 1) * L * 12) * 30.6001);
|
|
||||||
>>>>>>> d402a87... RDS radiotext and time group generators
|
|
||||||
|
|
||||||
blocks[0] = PI_code;
|
blocks[0] = PI_code;
|
||||||
blocks[1] = (0x4 << 12) | (0 << 11) | (b2b(TP) << 10) | ((PTY & 0x1F) << 5) | ((day_code & 0x18000) >> 15);
|
blocks[1] = (0x4 << 12) | (0 << 11) | (b2b(TP) << 10) | ((PTY & 0x1F) << 5) | ((day_code & 0x18000) >> 15);
|
||||||
@ -106,11 +98,7 @@ uint16_t gen_PSN(const char * psname, const RDS_flags * rds_flags) {
|
|||||||
|
|
||||||
// 4 groups with 2 PSN characters in each
|
// 4 groups with 2 PSN characters in each
|
||||||
for (c = 0; c < 4; c++)
|
for (c = 0; c < 4; c++)
|
||||||
<<<<<<< HEAD
|
|
||||||
make_0B_group(&group[c][0], rds_flags->PI_code, rds_flags->TP, rds_flags->PTY, rds_flags->TA, rds_flags->MS, rds_flags->DI, c, &psname[c * 2]);
|
make_0B_group(&group[c][0], rds_flags->PI_code, rds_flags->TP, rds_flags->PTY, rds_flags->TA, rds_flags->MS, rds_flags->DI, c, &psname[c * 2]);
|
||||||
=======
|
|
||||||
make_0B_group(&group[c][0], rds_flags->PI_code, rds_flags->TP, rds_flags->PTY, rds_flags->TA, rds_flags->MS, rds_flags->DI, c, &psname[c * 2]);
|
|
||||||
>>>>>>> d402a87... RDS radiotext and time group generators
|
|
||||||
|
|
||||||
// Generate checkbits for each block of each group
|
// Generate checkbits for each block of each group
|
||||||
for (c = 0; c < 4; c++) {
|
for (c = 0; c < 4; c++) {
|
||||||
@ -187,11 +175,7 @@ uint16_t gen_ClockTime(const RDS_flags * rds_flags,
|
|||||||
group[2] = makeblock(group[2], RDS_OFFSET_C);
|
group[2] = makeblock(group[2], RDS_OFFSET_C);
|
||||||
group[3] = makeblock(group[3], RDS_OFFSET_D);
|
group[3] = makeblock(group[3], RDS_OFFSET_D);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
uint32_t * tx_data_u32 = (uint32_t*)shared_memory.bb_data.data;
|
uint32_t * tx_data_u32 = (uint32_t*)shared_memory.bb_data.data;
|
||||||
=======
|
|
||||||
uint32_t * tx_data_u32 = (uint32_t*)shared_memory.tx_data;
|
|
||||||
>>>>>>> d402a87... RDS radiotext and time group generators
|
|
||||||
|
|
||||||
// Copy to tx_data for baseband
|
// Copy to tx_data for baseband
|
||||||
for (c = 0; c < 4; c++)
|
for (c = 0; c < 4; c++)
|
||||||
|
@ -37,19 +37,11 @@ namespace rds {
|
|||||||
|
|
||||||
struct RDS_flags {
|
struct RDS_flags {
|
||||||
uint16_t PI_code;
|
uint16_t PI_code;
|
||||||
<<<<<<< HEAD
|
|
||||||
uint8_t PTY;
|
uint8_t PTY;
|
||||||
uint8_t DI;
|
uint8_t DI;
|
||||||
bool TP;
|
bool TP;
|
||||||
bool TA;
|
bool TA;
|
||||||
bool MS;
|
bool MS;
|
||||||
=======
|
|
||||||
bool TP;
|
|
||||||
uint8_t PTY;
|
|
||||||
bool TA;
|
|
||||||
bool MS;
|
|
||||||
bool DI;
|
|
||||||
>>>>>>> d402a87... RDS radiotext and time group generators
|
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32_t makeblock(uint32_t blockdata, uint16_t offset);
|
uint32_t makeblock(uint32_t blockdata, uint16_t offset);
|
||||||
|
@ -271,7 +271,7 @@ BHTView::BHTView(NavigationView& nav) {
|
|||||||
&header_code_b,
|
&header_code_b,
|
||||||
&checkbox_speaker,
|
&checkbox_speaker,
|
||||||
&bmp_speaker,
|
&bmp_speaker,
|
||||||
&city_code_xs,
|
&city_code_xy,
|
||||||
&family_code_xy,
|
&family_code_xy,
|
||||||
&text_subfamily,
|
&text_subfamily,
|
||||||
&subfamily_code,
|
&subfamily_code,
|
||||||
|
@ -318,7 +318,7 @@ TransmitterAudioMenuView::TransmitterAudioMenuView(NavigationView& nav) {
|
|||||||
|
|
||||||
UtilitiesView::UtilitiesView(NavigationView& nav) {
|
UtilitiesView::UtilitiesView(NavigationView& nav) {
|
||||||
add_items<3>({ {
|
add_items<3>({ {
|
||||||
{ "Frequency manager", ui::Color::grey(), [&nav](){ nav.push<FreqManView>(); } },
|
{ "Frequency manager", ui::Color::red(), [&nav](){ nav.push<FreqManView>(); } },
|
||||||
{ "Whip antenna length", ui::Color::green(), [&nav](){ nav.push<WhipCalcView>(); } },
|
{ "Whip antenna length", ui::Color::green(), [&nav](){ nav.push<WhipCalcView>(); } },
|
||||||
{ "Notepad", ui::Color::grey(), [&nav](){ nav.push<NotImplementedView>(); } },
|
{ "Notepad", ui::Color::grey(), [&nav](){ nav.push<NotImplementedView>(); } },
|
||||||
} });
|
} });
|
||||||
|
@ -146,27 +146,15 @@ RDSView::RDSView(NavigationView& nav) {
|
|||||||
};
|
};
|
||||||
options_coverage.set_selected_index(0); // Local
|
options_coverage.set_selected_index(0); // Local
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
button_editpsn.on_select = [this, &nav](Button&) {
|
button_editpsn.on_select = [this, &nav](Button&) {
|
||||||
textentry(nav, PSN, 8);
|
textentry(nav, PSN, 8);
|
||||||
};
|
};
|
||||||
button_tx.on_select = [this](Button&) {
|
button_tx.on_select = [this](Button&) {
|
||||||
=======
|
|
||||||
options_pty.on_change = [this](size_t, int32_t v) {
|
|
||||||
rds_flags.PTY = v;
|
|
||||||
};
|
|
||||||
|
|
||||||
button_editpsn.on_select = [this,&nav](Button&) {
|
|
||||||
textentry(nav, PSN, 8);
|
|
||||||
};
|
|
||||||
button_txpsn.on_select = [this](Button&) {
|
|
||||||
>>>>>>> d402a87... RDS radiotext and time group generators
|
|
||||||
if (txing) {
|
if (txing) {
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
button_tx.set_text("START");
|
button_tx.set_text("START");
|
||||||
txing = false;
|
txing = false;
|
||||||
} else {
|
} else {
|
||||||
<<<<<<< HEAD
|
|
||||||
rds_flags.PI_code = sym_pi_code.value_hex_u64();
|
rds_flags.PI_code = sym_pi_code.value_hex_u64();
|
||||||
rds_flags.PTY = options_pty.selected_index_value();
|
rds_flags.PTY = options_pty.selected_index_value();
|
||||||
rds_flags.DI = check_mono_stereo.value() ? 1 : 0;
|
rds_flags.DI = check_mono_stereo.value() ? 1 : 0;
|
||||||
@ -182,10 +170,7 @@ RDSView::RDSView(NavigationView& nav) {
|
|||||||
message_length = gen_ClockTime(&rds_flags, 2016, 12, 1, 9, 23, 2);
|
message_length = gen_ClockTime(&rds_flags, 2016, 12, 1, 9, 23, 2);
|
||||||
|
|
||||||
button_tx.set_text("STOP");
|
button_tx.set_text("STOP");
|
||||||
=======
|
|
||||||
message_length = gen_PSN(PSN, &rds_flags);
|
|
||||||
button_txpsn.set_text("STOP");
|
|
||||||
>>>>>>> d402a87... RDS radiotext and time group generators
|
|
||||||
txing = true;
|
txing = true;
|
||||||
start_tx();
|
start_tx();
|
||||||
}
|
}
|
||||||
@ -194,22 +179,6 @@ RDSView::RDSView(NavigationView& nav) {
|
|||||||
button_editradiotext.on_select = [this, &nav](Button&){
|
button_editradiotext.on_select = [this, &nav](Button&){
|
||||||
textentry(nav, RadioText, 24);
|
textentry(nav, RadioText, 24);
|
||||||
};
|
};
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
button_txradiotext.on_select = [this](Button&){
|
|
||||||
if (txing) {
|
|
||||||
button_txpsn.set_text("PSN");
|
|
||||||
button_txradiotext.set_text("Radiotext");
|
|
||||||
transmitter_model.disable();
|
|
||||||
txing = false;
|
|
||||||
} else {
|
|
||||||
message_length = gen_RadioText(RadioText, 0, &rds_flags);
|
|
||||||
button_txradiotext.set_text("STOP");
|
|
||||||
txing = true;
|
|
||||||
start_tx();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
>>>>>>> d402a87... RDS radiotext and time group generators
|
|
||||||
|
|
||||||
button_exit.on_select = [&nav](Button&){
|
button_exit.on_select = [&nav](Button&){
|
||||||
nav.pop();
|
nav.pop();
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user