|
MODBUS laajempi esimerkki
|
Median calculation from Sensor readings. More...
#include "kosteus.h"
Functions | |
| void | calculate_median (Sensor_data *sensor_data) |
| This function calculates the medians of 11 values in an structure. More... | |
| void | shift_arrays (int array[], int array2[]) |
| This function shifts 2 arrays to the right by 1 and writes 0 to the first element. More... | |
| void | swap (int *a, int *b) |
| This function swaps values between variables. More... | |
Median calculation from Sensor readings.
Versions:
| void calculate_median | ( | Sensor_data * | sensor_data | ) |
This function calculates the medians of 11 values in an structure.
| sensor_data | Pointer to the structure that contains the measured data and the median variable. |


| void shift_arrays | ( | int | array[], |
| int | array2[] | ||
| ) |
This function shifts 2 arrays to the right by 1 and writes 0 to the first element.
| array | Array to be shifted. |
| array2 | Array to be shifted. |

| void swap | ( | int * | a, |
| int * | b | ||
| ) |
This function swaps values between variables.
| a | Pointer to the value witch will be swapped with b. |
| b | Pointer to the value witch will be swapped with a. |
