mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-24 06:44:25 -04:00
Testing external clock detection and auto-switch
Simplified audio spectrum computation and transfer ACARS RX in debug mode Disabled ABI warnings Updated binary
This commit is contained in:
parent
dc5d6fef70
commit
609235b19f
30 changed files with 318 additions and 182 deletions
|
@ -30,6 +30,7 @@
|
|||
using namespace hackrf::one;
|
||||
|
||||
#include "clock_manager.hpp"
|
||||
#include "event_m0.hpp"
|
||||
|
||||
#include "backlight.hpp"
|
||||
#include "touch_adc.hpp"
|
||||
|
@ -82,6 +83,7 @@ TransmitterModel transmitter_model;
|
|||
TemperatureLogger temperature_logger;
|
||||
|
||||
bool antenna_bias { false };
|
||||
bool prev_clkin_status { false };
|
||||
uint8_t bl_tick_counter { 0 };
|
||||
|
||||
void set_antenna_bias(const bool v) {
|
||||
|
@ -92,6 +94,22 @@ bool get_antenna_bias() {
|
|||
return antenna_bias;
|
||||
}
|
||||
|
||||
bool get_ext_clock() {
|
||||
return prev_clkin_status;
|
||||
}
|
||||
|
||||
void poll_ext_clock() {
|
||||
auto clkin_status = clock_generator.clkin_status();
|
||||
|
||||
if (clkin_status != prev_clkin_status) {
|
||||
StatusRefreshMessage message { };
|
||||
EventDispatcher::send_message(message);
|
||||
clock_manager.init(clkin_status);
|
||||
}
|
||||
|
||||
prev_clkin_status = clkin_status;
|
||||
}
|
||||
|
||||
class Power {
|
||||
public:
|
||||
void init() {
|
||||
|
@ -278,7 +296,7 @@ bool init() {
|
|||
led_rx.setup();
|
||||
led_tx.setup();
|
||||
|
||||
clock_manager.init();
|
||||
clock_manager.init(false);
|
||||
clock_manager.set_reference_ppb(persistent_memory::correction_ppb());
|
||||
clock_manager.run_at_full_speed();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue