mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-18 09:29:03 +08:00
Change some defines to static constexpr values
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#define CURRENT_ADC_LOWER_BOUND (uint32_t)((float)(1 << 12) * CURRENT_SENSE_MIN_VOLT / 3.3f)
|
||||
#define CURRENT_ADC_UPPER_BOUND (uint32_t)((float)(1 << 12) * CURRENT_SENSE_MAX_VOLT / 3.3f)
|
||||
static constexpr auto CURRENT_ADC_LOWER_BOUND = (uint32_t)((float)(1 << 12) * CURRENT_SENSE_MIN_VOLT / 3.3f);
|
||||
static constexpr auto CURRENT_ADC_UPPER_BOUND = (uint32_t)((float)(1 << 12) * CURRENT_SENSE_MAX_VOLT / 3.3f);
|
||||
|
||||
/**
|
||||
* @brief This control law adjusts the output voltage such that a predefined
|
||||
|
||||
Reference in New Issue
Block a user