ConductivityTeensy.c

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
how are unsigned integers negative?

how are unsigned integers negative?

Use uppercase F

Use uppercase F

Please declare local variables at top of scope (line 309 in this case).

Please declare local variables at top of scope (line 309 in this case).

The provided formula calculates electrolytic conductivity (k) by relating impedance measurements from a sensor to known calibration coefficients (B1,B2,B3) and an offset (B0). k: The calculated con...

The provided formula calculates electrolytic conductivity (k) by relating impedance measurements from a sensor to known calibration coefficients (B1,B2,B3) and an offset (B0).
k: The calculated conductivity.
impRz : The impedance of the solution, typically measured at a specific frequency (e.g., 100 kHz).
rtdRZ: The resistance of the Resistance Temperature Detector (RTD), used to perform temperature compensation.
B1,B2,B3, B0 : Empirical calibration coefficients specific to the sensor's geometry and electronic characteristics.

Linear Term (B3): Represents the primary relationship between conductance (1/impRZ) ) and conductivity. The factor of 1000 often scales the result into standard units like mS/cm or uS/cm

Temperature Compensation (B2 and B1): Since conductivity is highly temperature-dependent, these terms use rtdRZ
to adjust the calculation based on the actual temperature of the fluid. The logarithmic term (ln(rtdRz) accounts for non-linearities in the temperature response.

Offset (B0): Corrects for any residual signal or "zero-point" error in the measurement electronics.
.

at least mention what is the difference between the two apparoach?

at least mention what is the difference between the two apparoach?

There is no default case in that function switch ( sensorId ){ case P9_COND: sensorNum = TEENSY_SENSOR_0; break; case P18_COND: sensorNum = TEENSY_SENSOR_1; break; case D17_COND: sensorNum = TEENSY...

There is no default case in that function
switch ( sensorId )

Unknown macro: { case P9_COND}
typedef enum Conductivity_Models{ STANDARD, ///< standard equation for conductivity ALY_LINEAR, ///< Aly's high range model for conductivity UPDATED_STANDARD, ///< Updated stand equation with a lin...

typedef enum Conductivity_Models

Unknown macro: { STANDARD, ///< standard equation for conductivity ALY_LINEAR, ///< Aly's high range model for conductivity UPDATED_STANDARD, ///< Updated stand equation with a linear transformation. NUM_OF_MODELS, ///< Number of models used for conductivity calculation. }

COND_MODELS_T;

Its enumeration , if user send -1, -1 < NUM_OF_MODELS, this check passes

Since this driver is temporary, I don't think we need to document the approaches.

Since this driver is temporary, I don't think we need to document the approaches.

Doesn't look like this switch statement is doing anything. Can we remove it?

Doesn't look like this switch statement is doing anything. Can we remove it?

The Teensy driver is temporary - we will be deleting this driver in a few months. Let's just look for problems that might affect proper functionality.

The Teensy driver is temporary - we will be deleting this driver in a few months. Let's just look for problems that might affect proper functionality.

added

added

added

added

fixed.

fixed.

then we return false as expected

then we return false as expected

These are correct variable names based on their coefficient names in calculations of conductivity.

These are correct variable names based on their coefficient names in calculations of conductivity.

Can you clarify? this is allowing us to switch conductivity calculations based on the needs of the dialin user. ( systems team testing for accuracy )

Can you clarify? this is allowing us to switch conductivity calculations based on the needs of the dialin user. ( systems team testing for accuracy )

removed. thanks!

removed. thanks!

parameter check happens in getTeensyCondId

parameter check happens in getTeensyCondId

Yes as it is a way for us to identify if the teensy is not responding to us correctly. This along with no LED activity on the board helps us identify teensy failures

Yes as it is a way for us to identify if the teensy is not responding to us correctly. This along with no LED activity on the board helps us identify teensy failures

Not for this situation since its an array of structs and looks like a 2d array. Please see static const FP_OP_MODE_T MODE_TRANSITION_TABLE in FPOperationModes.c static const DD_OP_MODE_T MODE_TRAN...

Not for this situation since its an array of structs and looks like a 2d array. Please see

static const FP_OP_MODE_T MODE_TRANSITION_TABLE in FPOperationModes.c
static const DD_OP_MODE_T MODE_TRANSITION_TABLE in OperationModes.c
static PI_CONTROLLER_T piControllers in PIControllers.c ( FWCommon repo )

its unsigned integer , no need to check -ve value

its unsigned integer , no need to check -ve value

is this function required?

is this function required?

remove all commented code

remove all commented code

good to have doxygen comments on right hand side

good to have doxygen comments on right hand side

what if user send -ve values ?

what if user send -ve values ?

Where is len used ?

Where is len used ?

its a public function , input parameter check required, apply to all public functions

its a public function , input parameter check required, apply to all public functions

need documentation for this two approach, what is the merits ? when to use it ?

need documentation for this two approach, what is the merits ? when to use it ?

need math formula as documentation

need math formula as documentation

Need mathematical formula as documentation and need to explain each term

Need mathematical formula as documentation and need to explain each term