mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-25 07:27:42 +00:00
"At least it builds, now"
This commit is contained in:
@@ -172,6 +172,7 @@ CPPSRC = main.cpp \
|
||||
ui_spectrum.cpp \
|
||||
ui_loadmodule.cpp \
|
||||
ui_afskrx.cpp \
|
||||
ui_afsksetup.cpp \
|
||||
ui_sigfrx.cpp \
|
||||
ui_xylos.cpp \
|
||||
ui_numbers.cpp \
|
||||
@@ -246,7 +247,7 @@ INCDIR = ../common $(PORTINC) $(KERNINC) $(TESTINC) \
|
||||
MCU = cortex-m0
|
||||
|
||||
#TRGT = arm-elf-
|
||||
TRGT = arm-none-eabi-
|
||||
TRGT = /usr/local/gcc-arm-none-eabi-5_2-2015q4/bin/arm-none-eabi-
|
||||
CC = $(TRGT)gcc
|
||||
CPPC = $(TRGT)g++
|
||||
# Enable loading with g++ only if you need C++ runtime support.
|
||||
|
@@ -65,11 +65,7 @@ ReceiverModel receiver_model;
|
||||
|
||||
TemperatureLogger temperature_logger;
|
||||
|
||||
TemperatureLogger temperature_logger;
|
||||
|
||||
TransmitterModel transmitter_model {
|
||||
clock_manager
|
||||
};
|
||||
TransmitterModel transmitter_model;
|
||||
|
||||
uint8_t bl_tick_counter = 0;
|
||||
|
||||
|
@@ -34,8 +34,7 @@
|
||||
class TransmitterModel {
|
||||
public:
|
||||
constexpr TransmitterModel(
|
||||
ClockManager& clock_manager
|
||||
) : clock_manager(clock_manager)
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -77,7 +76,6 @@ private:
|
||||
.sampling_rate = 2280000,
|
||||
.decimation_factor = 1,
|
||||
};
|
||||
ClockManager& clock_manager;
|
||||
|
||||
int32_t tuning_offset();
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "hackrf_gpio.hpp"
|
||||
#include "portapack.hpp"
|
||||
#include "radio.hpp"
|
||||
#include "string_format.hpp"
|
||||
|
||||
#include "hackrf_hal.hpp"
|
||||
#include "portapack_shared_memory.hpp"
|
||||
@@ -37,7 +38,7 @@
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace hackrf::one;
|
||||
using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
|
||||
@@ -103,7 +104,7 @@ AFSKSetupView::AFSKSetupView(
|
||||
field_repeat.set_value(rpt);
|
||||
|
||||
button_setfreq.on_select = [this,&nav](Button&){
|
||||
auto new_view = new FrequencyKeypadView { nav, this->transmitter_model.tuning_frequency() };
|
||||
auto new_view = new FrequencyKeypadView { nav, transmitter_model.tuning_frequency() };
|
||||
new_view->on_changed = [this](rf::Frequency f) {
|
||||
updfreq(f);
|
||||
};
|
||||
|
@@ -107,14 +107,17 @@ private:
|
||||
|
||||
Checkbox checkbox_lsb {
|
||||
{ 8, 150 },
|
||||
9,
|
||||
"LSB first"
|
||||
};
|
||||
Checkbox checkbox_parity {
|
||||
{ 8, 180 },
|
||||
11,
|
||||
"Even parity"
|
||||
};
|
||||
Checkbox checkbox_datasize {
|
||||
{ 8, 210 },
|
||||
6,
|
||||
"8 bits"
|
||||
};
|
||||
|
||||
|
@@ -191,14 +191,17 @@ private:
|
||||
|
||||
Checkbox checkbox_range1 {
|
||||
{ 1 * 8, 6 * 16},
|
||||
7,
|
||||
"Range 1"
|
||||
};
|
||||
Checkbox checkbox_range2 {
|
||||
{ 1 * 8, 9 * 16 + 4},
|
||||
7,
|
||||
"Range 2"
|
||||
};
|
||||
Checkbox checkbox_range3 {
|
||||
{ 1 * 8, 12 * 16 + 8 },
|
||||
7,
|
||||
"Range 3"
|
||||
};
|
||||
|
||||
|
@@ -85,6 +85,7 @@ private:
|
||||
|
||||
Checkbox checkbox_am_a {
|
||||
{ 16, 68 },
|
||||
20,
|
||||
""
|
||||
};
|
||||
Button button_setam_a {
|
||||
@@ -93,6 +94,7 @@ private:
|
||||
};
|
||||
Checkbox checkbox_am_b {
|
||||
{ 16, 68+40 },
|
||||
20,
|
||||
""
|
||||
};
|
||||
Button button_setam_b {
|
||||
@@ -101,7 +103,8 @@ private:
|
||||
};
|
||||
Checkbox checkbox_am_c {
|
||||
{ 16, 68+40+40 },
|
||||
""
|
||||
20,
|
||||
" "
|
||||
};
|
||||
Button button_setam_c {
|
||||
{ 48, 64+40+40, 48, 32 },
|
||||
@@ -109,6 +112,7 @@ private:
|
||||
};
|
||||
Checkbox checkbox_am_d {
|
||||
{ 16, 68+40+40+40 },
|
||||
20,
|
||||
""
|
||||
};
|
||||
Button button_setam_d {
|
||||
@@ -117,6 +121,7 @@ private:
|
||||
};
|
||||
Checkbox checkbox_am_e {
|
||||
{ 16, 68+40+40+40+40 },
|
||||
20,
|
||||
""
|
||||
};
|
||||
Button button_setam_e {
|
||||
|
@@ -163,7 +163,7 @@ TranspondersMenuView::TranspondersMenuView(NavigationView& nav) {
|
||||
|
||||
ReceiverMenuView::ReceiverMenuView(NavigationView& nav) {
|
||||
add_items<2>({ {
|
||||
{ "Audio", ui::Color::white(), [&nav](){ nav.push<ReceiverView>(); } },
|
||||
{ "Audio", ui::Color::white(), [&nav](){ nav.push<AnalogAudioView>(); } },
|
||||
{ "Transponders", ui::Color::white(), [&nav](){ nav.push<TranspondersMenuView>(); } },
|
||||
} });
|
||||
}
|
||||
@@ -270,6 +270,29 @@ HackRFFirmwareView::HackRFFirmwareView(NavigationView& nav) {
|
||||
} });
|
||||
}
|
||||
|
||||
/* ***********************************************************************/
|
||||
|
||||
void BMPView::focus() {
|
||||
button_done.focus();
|
||||
}
|
||||
|
||||
BMPView::BMPView(NavigationView& nav) {
|
||||
add_children({ {
|
||||
&text_info,
|
||||
&button_done
|
||||
} });
|
||||
|
||||
button_done.on_select = [this,&nav](Button&){
|
||||
nav.pop();
|
||||
nav.push(new SystemMenuView { nav });
|
||||
};
|
||||
}
|
||||
|
||||
void BMPView::paint(Painter& painter) {
|
||||
(void)painter;
|
||||
portapack::display.drawBMP({(240-185)/2, 0}, splash_bmp);
|
||||
}
|
||||
|
||||
/* PlayDeadView **********************************************************/
|
||||
|
||||
void PlayDeadView::focus() {
|
||||
|
@@ -170,19 +170,18 @@ void AntennaBiasSetupView::focus() {
|
||||
button_done.focus();
|
||||
}
|
||||
|
||||
AboutView::AboutView(NavigationView& nav) {
|
||||
add_children({ {
|
||||
SetTouchCalibView::SetTouchCalibView(NavigationView& nav) {
|
||||
add_children({{
|
||||
&text_title,
|
||||
&text_firmware,
|
||||
&text_cpld_hackrf,
|
||||
&text_cpld_portapack,
|
||||
&button_ok,
|
||||
} });
|
||||
&text_debugx,
|
||||
&text_debugy,
|
||||
&button_ok
|
||||
}});
|
||||
|
||||
button_ok.on_select = [&nav](Button&){ nav.pop(); };
|
||||
}
|
||||
|
||||
void AboutView::focus() {
|
||||
void SetTouchCalibView::focus() {
|
||||
button_ok.focus();
|
||||
}
|
||||
|
||||
|
@@ -261,11 +261,13 @@ public:
|
||||
private:
|
||||
Checkbox checkbox_showsplash {
|
||||
{ 3 * 8, 2 * 16},
|
||||
11,
|
||||
"Show splash"
|
||||
};
|
||||
|
||||
Checkbox checkbox_bloff {
|
||||
{ 3 * 8, 4 * 16},
|
||||
20,
|
||||
"Backlight off after:"
|
||||
};
|
||||
|
||||
|
@@ -74,6 +74,7 @@ private:
|
||||
|
||||
Checkbox checkbox_am_a {
|
||||
{ 16, 68 },
|
||||
20,
|
||||
""
|
||||
};
|
||||
|
||||
|
@@ -230,6 +230,7 @@ private:
|
||||
};
|
||||
Checkbox checkbox_wcsubfamily {
|
||||
{ 20 * 8, 5 * 16},
|
||||
6,
|
||||
"Toutes"
|
||||
};
|
||||
|
||||
@@ -246,6 +247,7 @@ private:
|
||||
};
|
||||
Checkbox checkbox_wcid {
|
||||
{ 20 * 8, 7 * 16 + 4},
|
||||
4,
|
||||
"Tous"
|
||||
};
|
||||
|
||||
@@ -323,6 +325,7 @@ private:
|
||||
|
||||
Checkbox checkbox_cligno {
|
||||
{ 96, 16 * 16 + 4},
|
||||
3,
|
||||
"J/N"
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user