mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-11 09:09:29 +00:00
Re-enabled closecall even if it's still not working well
RDS PSN works again but update issue (UI ?) Moved CTCSS stuff to dedicated file
This commit is contained in:
@@ -333,6 +333,13 @@ set(MODE_CPPSRC
|
||||
)
|
||||
DeclareTargets(PSPE wideband_spectrum)
|
||||
|
||||
### Close Call
|
||||
|
||||
set(MODE_CPPSRC
|
||||
proc_closecall.cpp
|
||||
)
|
||||
DeclareTargets(PCLC closecall)
|
||||
|
||||
### OOK
|
||||
|
||||
set(MODE_CPPSRC
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2016 Furrtek
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2016 Furrtek
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
@@ -23,6 +24,7 @@
|
||||
#define __PROC_CLOSECALLPROCESSOR_H__
|
||||
|
||||
#include "baseband_processor.hpp"
|
||||
#include "baseband_thread.hpp"
|
||||
#include "spectrum_collector.hpp"
|
||||
|
||||
#include "message.hpp"
|
||||
@@ -38,6 +40,8 @@ public:
|
||||
void on_message(const Message* const message) override;
|
||||
|
||||
private:
|
||||
BasebandThread baseband_thread { 3072000, this, NORMALPRIO + 20, baseband::Direction::Receive };
|
||||
|
||||
SpectrumCollector channel_spectrum;
|
||||
|
||||
std::array<complex16_t, 256> spectrum;
|
||||
|
||||
@@ -35,6 +35,11 @@ void RDSProcessor::execute(const buffer_c8_t& buffer) {
|
||||
if (s >= 9) {
|
||||
s = 0;
|
||||
if (sample_count >= SAMPLES_PER_BIT) {
|
||||
if (bit_pos >= message_length) {
|
||||
bit_pos = 0;
|
||||
cur_output = 0;
|
||||
}
|
||||
|
||||
cur_bit = (rdsdata[(bit_pos / 26) & 15] >> (25 - (bit_pos % 26))) & 1;
|
||||
prev_output = cur_output;
|
||||
cur_output = prev_output ^ cur_bit;
|
||||
@@ -52,10 +57,7 @@ void RDSProcessor::execute(const buffer_c8_t& buffer) {
|
||||
in_sample_index += SAMPLES_PER_BIT;
|
||||
if (in_sample_index >= SAMPLE_BUFFER_SIZE) in_sample_index -= SAMPLE_BUFFER_SIZE;
|
||||
|
||||
if (bit_pos < message_length)
|
||||
bit_pos++;
|
||||
else
|
||||
bit_pos = 0;
|
||||
bit_pos++;
|
||||
|
||||
sample_count = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user