Commit 0e1c9ef9 authored by Clément Foucher's avatar Clément Foucher
Browse files

Correct missing return path.

parent 9b96cf7e
......@@ -63,7 +63,7 @@ static float32_t offset_adc2_triple_linearization[3] = {2036.583, 1834.98, 2160.
/**
* This function select the right conversion equation
* depending of the voltage measured to solve the non linear response
* depending of the voltage measured to solve the non linear response
* of V1 and V2 measurment component
*/
void triple_linerarization(float32_t value_adc, int8_t adc_channel)
......@@ -73,13 +73,11 @@ void triple_linerarization(float32_t value_adc, int8_t adc_channel)
gain_adc2[adc_channel] = gain_adc1_triple_linearization[0];
offset_adc2[adc_channel] = offset_adc2_triple_linearization[0];
}
else if ((value_adc >= 2350) && (value_adc <= 2609))
{
gain_adc2[adc_channel] = gain_adc1_triple_linearization[1];
offset_adc2[adc_channel] = offset_adc2_triple_linearization[1];
}
else if (value_adc > 2609)
{
gain_adc2[adc_channel] = gain_adc1_triple_linearization[2];
......@@ -95,7 +93,7 @@ void triple_linerarization(float32_t value_adc, int8_t adc_channel)
* into the proper value it represents
*/
void data_conversion()
{
{
if( (data_dispatch_get_values_available_in_adc1_channel(0)!=0) &&
(data_dispatch_get_values_available_in_adc1_channel(1)!=0) &&
(data_dispatch_get_values_available_in_adc1_channel(2)!=0) &&
......@@ -132,9 +130,12 @@ float32_t get_value_converted(uint8_t adc_number, uint8_t adc_channel)
{
return converted_values_adc1[adc_channel];
}
else if (adc_number == 2)
{
return converted_values_adc2[adc_channel];
}
else
{
return 0;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment