DIY Logging Volt/Ampmeter
|
Conversion and settings-related methods and structs for high-precision logging voltage/current meter. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | Data_t |
struct | cData_t |
struct | Settings_t |
Macros | |
#define | FLOAT_TO_INT(x) ((x)>=0?(uint32_t)((x)+0.5):(uint32_t)((x)-0.5)) |
Functions | |
void | initDataStruct (void) |
Function to initialize/reset the values in the data-struct. More... | |
void | initSettingsStruct (void) |
Function to initialize/reset the values in the settings-struct. More... | |
void | forceConversion (void) |
Function to force a conversion of all values not (yet) displayed on the OLED screens. More... | |
void | convertValues (void) |
Function to convert the measurements to char-arrays. More... | |
void | setSecondPassed (uint8_t value) |
uint8_t | getSecondPassed (void) |
void | incSecondPassed (void) |
Function to increase the value of secondPassed . More... | |
uint8_t | decSecondPassed (void) |
Function to decrease the value of secondPassed . More... | |
Variables | |
struct Data_t | data |
struct cData_t | cData |
struct Settings_t | settings |
Conversion and settings-related methods and structs for high-precision logging voltage/current meter.
Copyright (C) 2021 - Brecht Van Eeckhoudt
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A copy of the GNU General Public License can be found in the LICENSE
file along with this source code.
Definition in file conversion.h.
#define FLOAT_TO_INT | ( | x | ) | ((x)>=0?(uint32_t)((x)+0.5):(uint32_t)((x)-0.5)) |
Rounding macro
Definition at line 48 of file conversion.h.
void convertValues | ( | void | ) |
Function to convert the measurements to char-arrays.
Only updated and visible items on the OLED screens get converted.
Definition at line 172 of file conversion.c.
uint8_t decSecondPassed | ( | void | ) |
Function to decrease the value of secondPassed
.
0
- Could not decrease, value already at zero. 1
- secondPassed
decreased by one. Definition at line 447 of file conversion.c.
void forceConversion | ( | void | ) |
Function to force a conversion of all values not (yet) displayed on the OLED screens.
Definition at line 155 of file conversion.c.
uint8_t getSecondPassed | ( | void | ) |
void incSecondPassed | ( | void | ) |
Function to increase the value of secondPassed
.
Definition at line 433 of file conversion.c.
void initDataStruct | ( | void | ) |
Function to initialize/reset the values in the data-struct.
Definition at line 69 of file conversion.c.
void initSettingsStruct | ( | void | ) |
Function to initialize/reset the values in the settings-struct.
Definition at line 119 of file conversion.c.
void setSecondPassed | ( | uint8_t | value | ) |
struct cData_t cData |
struct Data_t data |
struct Settings_t settings |