You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now our technology supports two types of sensors, LINEAR and THERMISTANCE. These should be integrated into the function calls related to sensor parameters get and set dynamically. This will help redeability.
Describe the enhancement you'd like
We currently have two setConversionParameters functions as shown below:
/** * @brief Use this function to tweak the conversion values for the * channel if default values are not accurate enough. * * @note This function can't be called before the pin is enabled. * The DataAPI module must not have been started, neither * explicitly nor by starting the Uninterruptible task. * * @param[in] pin_number Number of the pin from which to obtain values. * @param[in] gain Gain to be applied (multiplied) to the channel raw value. * @param[in] offset Offset to be applied (added) to the channel value * after gain has been applied. */voidsetConversionParametersLinear(uint8_tpin_number, float32_tgain, float32_toffset);
/** * @brief Use this function to set the conversion values for any NTC * thermistor sensor if default values are not accurate enough. * * @note This function can't be called before the sensor is enabled. * The DataAPI must not have been started, neither explicitly * nor by starting the Uninterruptible task. * * @param[in] pin_number Number of the pin from which to obtain values. * @param[in] r0 The NTC resistance at a reference temperature. * @param[in] b The sensibility coefficient of the resistance to temperature. * @param[in] rdiv The bridge dividor resistance used to condition the NTC. * @param[in] t0 The reference temperature of the thermistor. */voidsetConversionParametersNtcThermistor(uint8_tpin_num, float32_tr0, float32_tb, float32_trdiv, float32_tt0);
We should be able to test for the conversion_type_t and set the parameters accordingly.
Is your feature request related to a problem? Please describe.
Right now our technology supports two types of sensors, LINEAR and THERMISTANCE. These should be integrated into the function calls related to sensor parameters get and set dynamically. This will help redeability.
Describe the enhancement you'd like
We currently have two setConversionParameters functions as shown below:
We should be able to test for the
conversion_type_t
and set the parameters accordingly.For now parameters are a typedef enum:
And parameters are individualized, making it impossible to set them without two distinct funcitons.
Describe alternatives you've considered
For now what we have works with these two functions. But we should do better.
The text was updated successfully, but these errors were encountered: