mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 11:24:27 +02:00
@@ -59,7 +59,7 @@ inline constexpr voltage_hw_t voltage_hw_zero = voltage_hw_range / 2;
|
||||
|
||||
// clang-format off
|
||||
inline constexpr struct hw_voltage_origin final :
|
||||
relative_point_origin<absolute<si::volt>(min_voltage)> {} hw_voltage_origin;
|
||||
relative_point_origin<point<si::volt>(min_voltage)> {} hw_voltage_origin;
|
||||
|
||||
inline constexpr struct hw_voltage_unit final :
|
||||
named_unit<"hwV", mag_ratio<voltage_range, voltage_hw_range> * si::volt, hw_voltage_origin> {} hw_voltage_unit;
|
||||
@@ -74,7 +74,7 @@ std::optional<hw_voltage_quantity_point> read_hw_voltage()
|
||||
{
|
||||
voltage_hw_t local_copy = hw_voltage_value;
|
||||
if (local_copy == voltage_hw_error) return std::nullopt;
|
||||
return absolute<hw_voltage_unit>(local_copy);
|
||||
return point<hw_voltage_unit>(local_copy);
|
||||
}
|
||||
|
||||
void print(QuantityPoint auto qp)
|
||||
|
Reference in New Issue
Block a user