diff --git a/apix-adc-example/README.md b/apix-adc-example/README.md
index 6dbda34..a648949 100644
--- a/apix-adc-example/README.md
+++ b/apix-adc-example/README.md
@@ -4,7 +4,7 @@ Digi APIX ADC Sample Application
Sample application to access and manage ADC channels using the Digi APIX library.
The application enables one ADC channel on the board. After that, the application
-takes periodic samples and calculates the rms and mean value of the samples batch.
+takes periodic samples and prints the raw value and the value in mv.
The ADC lines used in the sample are mapped as follows in the Digi Boards:
- **CCIMX6 SBC**: PMIC_ADCIN1 (GPIO Connector Pin 1).
@@ -90,4 +90,4 @@ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
\ No newline at end of file
+THIS SOFTWARE.
diff --git a/apix-adc-example/main.c b/apix-adc-example/main.c
index 23f7591..51feaef 100644
--- a/apix-adc-example/main.c
+++ b/apix-adc-example/main.c
@@ -32,8 +32,6 @@ static adc_t *adc;
struct adc_sampling_cb_data {
adc_t *adc;
- int total_value;
- int total_value_rms;
int number_of_samples;
};
@@ -143,8 +141,6 @@ static int adc_sampling_cb(int sample, void *arg)
struct adc_sampling_cb_data *data = arg;
float sample_mv = 0;
- data->total_value += sample;
- data->total_value_rms += powf(sample, 2);
data->number_of_samples--;
sample_mv = ldx_adc_convert_sample_to_mv(data->adc, sample);
@@ -193,8 +189,6 @@ int main(int argc, char *argv[])
}
cb_data.number_of_samples = number_of_samples;
- cb_data.total_value = 0;
- cb_data.total_value_rms = 0;
/* Register signals and exit cleanup function */
atexit(cleanup);
@@ -220,10 +214,5 @@ int main(int argc, char *argv[])
sleep(1);
}
- printf("The mean value of the samples is: %d mV\n",
- cb_data.total_value/number_of_samples);
- printf("The RMS value of the samples is: %.2f mV\n",
- sqrt(cb_data.total_value_rms/number_of_samples));
-
return EXIT_SUCCESS;
}
diff --git a/samples-manifest.xml b/samples-manifest.xml
index 3f9a984..4dfcc41 100644
--- a/samples-manifest.xml
+++ b/samples-manifest.xml
@@ -68,7 +68,7 @@ the number of address bytes.
Digi APIX ADC Sample
Sample application to access and manage ADC channels using the Digi APIX library.
-The application enables one ADC channel on the board. After that, the application takes periodic samples and calculates the rms and mean value of the samples batch.
+The application enables one ADC channel on the board. After that, the application takes periodic samples and prints the raw value and the value in mv.
apix-adc-example