|
RocketLogger
2.0.2
|
Include dependency graph for calibration.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | rl_calibration |
| struct | rl_calibration_file |
Macros | |
| #define | RL_CALIBRATION_FILE_MAGIC 0x434C5225 |
| Calibration file header magic. More... | |
| #define | RL_CALIBRATION_FILE_VERSION 0x02 |
| Calibration file header version. More... | |
| #define | RL_CALIBRATION_FILE_HEADER_LENGTH 0x10 |
| Calibration file header length. More... | |
Typedefs | |
| typedef struct rl_calibration | rl_calibration_t |
| typedef struct rl_calibration_file | rl_calibration_file_t |
Functions | |
| struct rl_calibration | __attribute__ ((packed)) |
| void | calibration_reset_offsets (void) |
| void | calibration_reset_scales (void) |
| int | calibration_load (void) |
Variables | |
| int | offsets [RL_CHANNEL_COUNT] |
| Channel offsets (in bit) More... | |
| double | scales [RL_CHANNEL_COUNT] |
| Channel scales. More... | |
| uint32_t | file_magic |
| File magic constant. More... | |
| uint16_t | file_version |
| File version number. More... | |
| uint16_t | header_length |
| Total size of the header in bytes. More... | |
| uint64_t | calibration_time |
| Timestamp of the measurements used for calibration generation. More... | |
| rl_calibration_t | data |
| The actual calibration data. More... | |
| rl_calibration_t | rl_calibration |
| Global calibration data structure. More... | |
| #define RL_CALIBRATION_FILE_HEADER_LENGTH 0x10 |
Calibration file header length.
Definition at line 44 of file calibration.h.
| #define RL_CALIBRATION_FILE_MAGIC 0x434C5225 |
Calibration file header magic.
Copyright (c) 2016-2020, ETH Zurich, Computer Engineering Group All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 40 of file calibration.h.
| #define RL_CALIBRATION_FILE_VERSION 0x02 |
Calibration file header version.
Definition at line 42 of file calibration.h.
| typedef struct rl_calibration_file rl_calibration_file_t |
Typedef for RocketLogger calibration file structure.
Definition at line 1 of file calibration.h.
| typedef struct rl_calibration rl_calibration_t |
Typedef for RocketLogger calibration data.
Definition at line 1 of file calibration.h.
| struct rl_calibration_file __attribute__ | ( | (packed) | ) |
| int calibration_load | ( | void | ) |
Load the calibration values from calibration file.
| config | Pointer to rl_config_t struct. |
Definition at line 57 of file calibration.c.
References rl_status::calibration_file, calibration_reset_offsets(), calibration_reset_scales(), rl_calibration_file::calibration_time, rl_status::calibration_time, rl_calibration_file::data, ERROR, rl_calibration_file::file_magic, rl_calibration_file::file_version, rl_calibration_file::header_length, RL_CALIBRATION_FILE_HEADER_LENGTH, RL_CALIBRATION_FILE_MAGIC, RL_CALIBRATION_FILE_VERSION, RL_CALIBRATION_SYSTEM_FILE, RL_CALIBRATION_USER_FILE, rl_log(), RL_LOG_ERROR, and SUCCESS.
Referenced by hw_sample().
Here is the call graph for this function:| void calibration_reset_offsets | ( | void | ) |
Reset all calibration offsets to default state (0).
Definition at line 45 of file calibration.c.
References rl_calibration::offsets, and RL_CHANNEL_COUNT.
Referenced by calibration_load(), and hw_sample().
| void calibration_reset_scales | ( | void | ) |
Reset all calibration scales to default state (1).
Definition at line 51 of file calibration.c.
References RL_CHANNEL_COUNT, and rl_calibration::scales.
Referenced by calibration_load(), and hw_sample().
| uint64_t calibration_time |
Timestamp of the measurements used for calibration generation.
Definition at line 7 of file calibration.h.
| rl_calibration_t data |
The actual calibration data.
Definition at line 9 of file calibration.h.
Referenced by bme280_read(), bme280_read_calibration(), print_json_bool(), print_json_int64(), rl_file_add_data_block(), and tsl4531_read().
| uint32_t file_magic |
File magic constant.
Definition at line 1 of file calibration.h.
| uint16_t file_version |
File version number.
Definition at line 3 of file calibration.h.
| uint16_t header_length |
Total size of the header in bytes.
Definition at line 5 of file calibration.h.
| int offsets[RL_CHANNEL_COUNT] |
Channel offsets (in bit)
Definition at line 1 of file calibration.h.
|
extern |
Global calibration data structure.
Global calibration data structure.
Copyright (c) 2016-2020, ETH Zurich, Computer Engineering Group All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 43 of file calibration.c.
| double scales[RL_CHANNEL_COUNT] |
Channel scales.
Definition at line 3 of file calibration.h.