mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-25 05:47:44 +00:00
More AFSK options, scan lists,
This commit is contained in:
@@ -530,14 +530,14 @@ public:
|
||||
const uint32_t afsk_phase_inc_space,
|
||||
const uint8_t afsk_repeat,
|
||||
const uint32_t afsk_bw,
|
||||
const bool afsk_alt_format
|
||||
const uint8_t afsk_format
|
||||
) : Message { ID::AFSKConfigure },
|
||||
afsk_samples_per_bit(afsk_samples_per_bit),
|
||||
afsk_phase_inc_mark(afsk_phase_inc_mark),
|
||||
afsk_phase_inc_space(afsk_phase_inc_space),
|
||||
afsk_repeat(afsk_repeat),
|
||||
afsk_bw(afsk_bw),
|
||||
afsk_alt_format(afsk_alt_format)
|
||||
afsk_format(afsk_format)
|
||||
{
|
||||
memcpy(message_data, data, 512);
|
||||
}
|
||||
@@ -547,7 +547,7 @@ public:
|
||||
uint32_t afsk_phase_inc_space;
|
||||
uint8_t afsk_repeat;
|
||||
uint32_t afsk_bw;
|
||||
bool afsk_alt_format;
|
||||
uint8_t afsk_format;
|
||||
char message_data[512];
|
||||
};
|
||||
|
||||
|
@@ -36,16 +36,16 @@ using portapack::memory::map::backup_ram;
|
||||
namespace portapack {
|
||||
namespace persistent_memory {
|
||||
|
||||
constexpr rf::Frequency tuned_frequency_reset_value { 858750000 };
|
||||
constexpr rf::Frequency tuned_frequency_reset_value { 88000000 };
|
||||
|
||||
using ppb_range_t = range_t<ppb_t>;
|
||||
constexpr ppb_range_t ppb_range { -99000, 99000 };
|
||||
constexpr ppb_t ppb_reset_value { 0 };
|
||||
|
||||
using afsk_freq_range_t = range_t<int32_t>;
|
||||
constexpr afsk_freq_range_t afsk_freq_range { 1, 60 };
|
||||
constexpr int32_t afsk_mark_reset_value { 12 };
|
||||
constexpr int32_t afsk_space_reset_value { 22 };
|
||||
constexpr afsk_freq_range_t afsk_freq_range { 1, 400 };
|
||||
constexpr int32_t afsk_mark_reset_value { 48 };
|
||||
constexpr int32_t afsk_space_reset_value { 88 };
|
||||
|
||||
using afsk_bitrate_range_t = range_t<int32_t>;
|
||||
constexpr afsk_bitrate_range_t afsk_bitrate_range { 600, 9600 };
|
||||
@@ -63,7 +63,7 @@ struct data_t {
|
||||
|
||||
// AFSK modem
|
||||
int32_t afsk_mark_freq;
|
||||
int32_t afsk_space_freq; // Todo: optimize size, only 256 bytes of NVRAM !
|
||||
int32_t afsk_space_freq; // Todo: reduce size, only 256 bytes of NVRAM !
|
||||
int32_t afsk_bitrate;
|
||||
int32_t afsk_bw;
|
||||
uint32_t afsk_config;
|
||||
@@ -139,8 +139,12 @@ uint32_t afsk_config() {
|
||||
return data->afsk_config;
|
||||
}
|
||||
|
||||
uint8_t afsk_format() {
|
||||
return ((data->afsk_config >> 16) & 0xFF);
|
||||
}
|
||||
|
||||
uint8_t afsk_repeats() {
|
||||
return (data->afsk_config >> 8);
|
||||
return (data->afsk_config >> 24);
|
||||
}
|
||||
|
||||
void set_afsk_config(const uint32_t new_value) {
|
||||
|
@@ -47,6 +47,7 @@ int32_t afsk_bitrate();
|
||||
void set_afsk_bitrate(const int32_t new_value);
|
||||
|
||||
uint32_t afsk_config();
|
||||
uint8_t afsk_format();
|
||||
uint8_t afsk_repeats();
|
||||
void set_afsk_config(const uint32_t new_value);
|
||||
|
||||
|
Reference in New Issue
Block a user