Add calibration routine from shell
This commit is contained in:
@@ -11,4 +11,7 @@
|
||||
|
||||
#define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
|
||||
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#endif /* __HELPER_MACROS_H__ */
|
||||
|
@@ -20,13 +20,16 @@
|
||||
#ifndef __CALIBRATION_H__
|
||||
#define __CALIBRATION_H__
|
||||
|
||||
#define CALIBRATION_MAX_STDDEV_OHM 1.0f
|
||||
#define CALIBRATION_MAX_PEAK_PEAK_NOISE_OHM 8.0f
|
||||
|
||||
#include <stdint.h>
|
||||
#include <shellmatta.h>
|
||||
|
||||
void calibration_calculate(float low_measured, float low_setpoint, float high_measured, float high_setpoint,
|
||||
float *sens_deviation, float *sens_corrected_offset);
|
||||
|
||||
int calibration_acquire_data(float *mu, float *sigma, uint32_t count);
|
||||
int calibration_acquire_data(float *mu, float *max_dev, uint32_t count);
|
||||
|
||||
int calibration_sequence_shell_cmd(shellmatta_handle_t shell);
|
||||
|
||||
#endif /* __CALIBRATION_H__ */
|
||||
|
@@ -51,7 +51,7 @@ int dma_ring_buffer_periph_to_mem_initialize(struct dma_ring_buffer_to_mem *dma_
|
||||
* @param[in] buff Ring buffer structure
|
||||
* @param[out] data_buff Pointer to set to new data. This must not be modified!
|
||||
* @param[out] len Length in elements
|
||||
* @return 0 if successful (data, no data), -1 if error, and 1 if data with wrap around. Call function again in this case to retrieve rest after wrap around.
|
||||
* @return 0 if successful, but no data), -1 if error, 1 if data, and 2 if data with wrap around. Call function again in this case to retrieve rest after wrap around.
|
||||
*/
|
||||
int dma_ring_buffer_periph_to_mem_get_data(struct dma_ring_buffer_to_mem *buff, const void **data_buff, size_t *len);
|
||||
|
||||
|
Reference in New Issue
Block a user