Skip to content

Commit

Permalink
Merge pull request #18 from joshua-jerred/parameter-fix
Browse files Browse the repository at this point in the history
Access to parameter doubles
  • Loading branch information
joshua-jerred authored Oct 18, 2024
2 parents 1c28295 + 5abd581 commit c8a4417
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/SignalEasel/aprs/telemetry_parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ class AnalogParameter : public Parameter {
coefficient_c = coefficient_c_;
}

double getCoefficientAd() const;
double getCoefficientBd() const;
double getCoefficientCd() const;

private:
/// @brief The raw value of the analog parameter (0-255).
uint8_t raw_value_{0};
Expand Down
6 changes: 6 additions & 0 deletions src/aprs/telemetry_parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ bool AnalogParameter::setCoefficientC(const std::string &coefficient) {
return true;
}

double AnalogParameter::getCoefficientAd() const { return a_; }

double AnalogParameter::getCoefficientBd() const { return b_; }

double AnalogParameter::getCoefficientCd() const { return c_; }

bool AnalogParameter::setCoefficients(const std::string &coefficient_a,
const std::string &coefficient_b,
const std::string &coefficient_c) {
Expand Down

0 comments on commit c8a4417

Please sign in to comment.