diff --git a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/build_config.hpp b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/build_config.hpp index 3eba3ba6bf..b3bf403594 100644 --- a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/build_config.hpp +++ b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/build_config.hpp @@ -15,6 +15,10 @@ # define UAVCAN_STM32_NUTTX 0 #endif +#ifndef UAVCAN_STM32_BAREMETAL +# define UAVCAN_STM32_BAREMETAL 0 +#endif + /** * Number of interfaces must be enabled explicitly */ diff --git a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp index b11438d787..eeceaf3d77 100644 --- a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp +++ b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp @@ -50,13 +50,23 @@ void adjustUtc(uavcan::UtcDuration adjustment); */ struct UtcSyncParams { - float offset_p = 0.01F; ///< PPM per one usec error - float rate_i = 0.02F; ///< PPM per one PPM error for second - float rate_error_corner_freq = 0.01F; - float max_rate_correction_ppm = 300.0F; - float lock_thres_rate_ppm = 2.0F; - uavcan::UtcDuration lock_thres_offset = uavcan::UtcDuration::fromMSec(4); - uavcan::UtcDuration min_jump = uavcan::UtcDuration::fromMSec(10); ///< Min error to jump rather than change rate + float offset_p; ///< PPM per one usec error + float rate_i; ///< PPM per one PPM error for second + float rate_error_corner_freq; + float max_rate_correction_ppm; + float lock_thres_rate_ppm; + uavcan::UtcDuration lock_thres_offset; + uavcan::UtcDuration min_jump; ///< Min error to jump rather than change rate + + UtcSyncParams() + : offset_p(0.01F) + , rate_i(0.02F) + , rate_error_corner_freq(0.01F) + , max_rate_correction_ppm(300.0F) + , lock_thres_rate_ppm(2.0F) + , lock_thres_offset(uavcan::UtcDuration::fromMSec(4)) + , min_jump(uavcan::UtcDuration::fromMSec(10)) + { } }; /**