Renaming power -> magnitude
This commit is contained in:
parent
0bb7c1fdb0
commit
9569df9e82
|
@ -27,7 +27,7 @@ const DAC_SEQUENCE: [i16; design_parameters::SAMPLE_BUFFER_SIZE] =
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Deserialize, Miniconf)]
|
#[derive(Copy, Clone, Debug, Deserialize, Miniconf)]
|
||||||
enum Conf {
|
enum Conf {
|
||||||
Power,
|
Magnitude,
|
||||||
Phase,
|
Phase,
|
||||||
PllFrequency,
|
PllFrequency,
|
||||||
LogPower,
|
LogPower,
|
||||||
|
@ -227,7 +227,7 @@ const APP: () = {
|
||||||
for (channel, samples) in dac_samples.iter_mut().enumerate() {
|
for (channel, samples) in dac_samples.iter_mut().enumerate() {
|
||||||
for (i, sample) in samples.iter_mut().enumerate() {
|
for (i, sample) in samples.iter_mut().enumerate() {
|
||||||
let value = match settings.output_conf[channel] {
|
let value = match settings.output_conf[channel] {
|
||||||
Conf::Power => output.abs_sqr() as i32 >> 16,
|
Conf::Magnitude => output.abs_sqr() as i32 >> 16,
|
||||||
Conf::Phase => output.arg() >> 16,
|
Conf::Phase => output.arg() >> 16,
|
||||||
Conf::LogPower => (output.log2() << 24) as i32 >> 16,
|
Conf::LogPower => (output.log2() << 24) as i32 >> 16,
|
||||||
Conf::PllFrequency => pll_frequency as i32 >> 16,
|
Conf::PllFrequency => pll_frequency as i32 >> 16,
|
||||||
|
|
Loading…
Reference in New Issue