mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 17:05:37 -04:00
App settings revamp (#1139)
* WIP AppSetting overhaul * WIP migrating apps to new settings. * remove settings, rename tuned => target * formatting * Minor fixes * Fix hang on app load * run formatter * PR comment fixes * Load modulation into receiver model in app_settings * Run formatter --------- Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
parent
f65e743c4c
commit
8bd3d6249d
105 changed files with 914 additions and 1136 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <cstddef>
|
||||
|
||||
#include "receiver_model.hpp"
|
||||
#include "app_settings.hpp"
|
||||
#include "message.hpp"
|
||||
#include "rf_path.hpp"
|
||||
#include "max2837.hpp"
|
||||
|
@ -35,35 +36,42 @@
|
|||
|
||||
class TransmitterModel {
|
||||
public:
|
||||
rf::Frequency tuning_frequency() const;
|
||||
void set_tuning_frequency(rf::Frequency f);
|
||||
/* The frequency to transmit on. */
|
||||
rf::Frequency target_frequency() const;
|
||||
void set_target_frequency(rf::Frequency f);
|
||||
|
||||
void set_antenna_bias();
|
||||
|
||||
bool rf_amp() const;
|
||||
void set_rf_amp(bool enabled);
|
||||
|
||||
// TODO: does this make sense on TX?
|
||||
int32_t lna() const;
|
||||
void set_lna(int32_t v_db);
|
||||
|
||||
uint32_t baseband_bandwidth() const;
|
||||
void set_baseband_bandwidth(uint32_t v);
|
||||
|
||||
// TODO: does this make sense on TX?
|
||||
int32_t vga() const;
|
||||
void set_vga(int32_t v_db);
|
||||
|
||||
int32_t tx_gain() const;
|
||||
void set_tx_gain(int32_t v_db);
|
||||
|
||||
// TODO: Doesn't actually affect radio.
|
||||
uint32_t channel_bandwidth() const;
|
||||
void set_channel_bandwidth(uint32_t v);
|
||||
|
||||
// TODO: does this make sense on TX?
|
||||
uint32_t sampling_rate() const;
|
||||
void set_sampling_rate(uint32_t v);
|
||||
|
||||
void enable();
|
||||
void disable();
|
||||
|
||||
void configure_from_app_settings(const app_settings::AppSettings& settings);
|
||||
|
||||
private:
|
||||
bool enabled_{false};
|
||||
bool rf_amp_{false};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue