Control Pounder through MQTT
Description
This PR implements control of devices on Pounder through MQTT.
These parameters are configurable through MQTT (topic prefix: <prefix>/settings/pdh/ch/<n>).
pub struct PDHChannel {
pub osc_frequency: f32, // Frequency of the IN/OUT DDS pair
pub out_phase: f32, // Phase offset of the OUT DDS channel
pub in_phase_offset: f32, // Phase offset of the IN DDS channel relative to the OUT DDS channel
pub amplitude: f32, // Amplitude of the OUT DDS channel
pub in_attenuation: f32, // Attenuation of the signal injected to INx connector
pub out_attenuation: f32, // Attenuation of the OUT DDS channel
pub enabled: bool, // Amplitude of the IN DDS channel (0.0 or 1.0)
}
Temperature reading from Pounder (LM75) & input powers (after attenuators) are reported in telemetry.
I also tried reporting power level through the LED, but I got issues like AttRstN being stuck at low voltage. I have another branch in my fork that has working LED using the mcp23017 library.
Added the same Pounder telemetry to lockin variant.
@jordens What are the plans of Pounder for lockin?
There are no plans for Pounder and lockin.
Most of the system clock calculation & parameter conversions are direct copy of those in ad9959. What about this:
- Make associated functions in
ad9959for frequency/amplitude/phase to ftw/acr/pow conversions. - Refactor existing methods in
ad9959that use these conversions. - Fix the frequency boundary checks for clock configuration functions in
ad9959.
Closed in favor of #725