#include "../../Inc/Utils/Units.h"
#include "../../Inc/Utils/MessageFormat.h"
#include <string.h>
#include <math.h>
Go to the source code of this file.
◆ convertUnits()
| float convertUnits |
( |
float |
value, |
|
|
UnitId |
from_unit, |
|
|
UnitId |
to_unit |
|
) |
| |
Definition at line 99 of file Units.c.
99 {
102
103
105 return value;
106 }
107
108
111}
const UnitDefinition * getUnitDefinition(UnitId unit_id)
◆ getUnitDefinition()
Definition at line 78 of file Units.c.
78 {
81 }
83}
static const UnitDefinition unit_definitions[UNIT_COUNT]
◆ getUnitIdBySymbol()
| UnitId getUnitIdBySymbol |
( |
const char * |
symbol | ) |
|
Definition at line 85 of file Units.c.
85 {
88 return i;
89 }
90 }
92}
◆ initUnits()
◆ validateUnitValue()
| bool validateUnitValue |
( |
UnitId |
unit_id, |
|
|
float |
value |
|
) |
| |
Definition at line 94 of file Units.c.
94 {
96 return (value >= unit->
absolute_min && value <= unit->absolute_max);
97}
◆ unit_definitions