Renaming AdcSample -> AdcCode
This commit is contained in:
parent
923790b0b9
commit
60b1b112b1
|
@ -9,7 +9,7 @@ use serde::Deserialize;
|
|||
|
||||
use dsp::iir;
|
||||
use hardware::{
|
||||
Adc0Input, Adc1Input, AdcSample, AfeGain, Dac0Output, Dac1Output, DacCode,
|
||||
Adc0Input, Adc1Input, AdcCode, AfeGain, Dac0Output, Dac1Output, DacCode,
|
||||
DigitalInput0, DigitalInput1, InputPin, SystemTimer, AFE0, AFE1,
|
||||
};
|
||||
|
||||
|
@ -160,7 +160,7 @@ const APP: () = {
|
|||
|
||||
// Update telemetry measurements.
|
||||
c.resources.telemetry.adcs =
|
||||
[AdcSample(adc_samples[0][0]), AdcSample(adc_samples[1][0])];
|
||||
[AdcCode(adc_samples[0][0]), AdcCode(adc_samples[1][0])];
|
||||
|
||||
c.resources.telemetry.dacs =
|
||||
[DacCode(dac_samples[0][0]), DacCode(dac_samples[1][0])];
|
||||
|
|
|
@ -12,7 +12,7 @@ use dsp::{Accu, Complex, ComplexExt, Lockin, RPLL};
|
|||
use stabilizer::net;
|
||||
|
||||
use stabilizer::hardware::{
|
||||
design_parameters, setup, Adc0Input, Adc1Input, AdcSample, AfeGain,
|
||||
design_parameters, setup, Adc0Input, Adc1Input, AdcCode, AfeGain,
|
||||
Dac0Output, Dac1Output, DacCode, DigitalInput0, DigitalInput1,
|
||||
InputStamper, SystemTimer, AFE0, AFE1,
|
||||
};
|
||||
|
@ -240,7 +240,7 @@ const APP: () = {
|
|||
|
||||
// Update telemetry measurements.
|
||||
c.resources.telemetry.adcs =
|
||||
[AdcSample(adc_samples[0][0]), AdcSample(adc_samples[1][0])];
|
||||
[AdcCode(adc_samples[0][0]), AdcCode(adc_samples[1][0])];
|
||||
|
||||
c.resources.telemetry.dacs =
|
||||
[DacCode(dac_samples[0][0]), DacCode(dac_samples[1][0])];
|
||||
|
|
|
@ -86,9 +86,9 @@ use hal::dma::{
|
|||
|
||||
/// A type representing an ADC sample.
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct AdcSample(pub u16);
|
||||
pub struct AdcCode(pub u16);
|
||||
|
||||
impl Into<f32> for AdcSample {
|
||||
impl Into<f32> for AdcCode {
|
||||
/// Convert raw ADC codes to/from voltage levels.
|
||||
///
|
||||
/// # Note
|
||||
|
|
|
@ -19,7 +19,7 @@ pub mod pounder;
|
|||
mod system_timer;
|
||||
mod timers;
|
||||
|
||||
pub use adc::{Adc0Input, Adc1Input, AdcSample};
|
||||
pub use adc::{Adc0Input, Adc1Input, AdcCode};
|
||||
pub use afe::Gain as AfeGain;
|
||||
pub use cycle_counter::CycleCounter;
|
||||
pub use dac::{Dac0Output, Dac1Output, DacCode};
|
||||
|
|
|
@ -16,7 +16,7 @@ use serde::Serialize;
|
|||
|
||||
use super::NetworkReference;
|
||||
use crate::hardware::{
|
||||
design_parameters::MQTT_BROKER, AdcSample, AfeGain, DacCode,
|
||||
design_parameters::MQTT_BROKER, AdcCode, AfeGain, DacCode,
|
||||
};
|
||||
|
||||
/// The telemetry client for reporting telemetry data over MQTT.
|
||||
|
@ -35,7 +35,7 @@ pub struct TelemetryClient<T: Serialize> {
|
|||
#[derive(Copy, Clone)]
|
||||
pub struct TelemetryBuffer {
|
||||
/// The latest input sample on ADC0/ADC1.
|
||||
pub adcs: [AdcSample; 2],
|
||||
pub adcs: [AdcCode; 2],
|
||||
/// The latest output code on DAC0/DAC1.
|
||||
pub dacs: [DacCode; 2],
|
||||
/// The latest digital input states during processing.
|
||||
|
@ -57,7 +57,7 @@ pub struct Telemetry {
|
|||
impl Default for TelemetryBuffer {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
adcs: [AdcSample(0), AdcSample(0)],
|
||||
adcs: [AdcCode(0), AdcCode(0)],
|
||||
dacs: [DacCode(0), DacCode(0)],
|
||||
digital_inputs: [false, false],
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue