|
|
static constexpr size_t | stripNbBuffers = 3 |
| |
|
static constexpr float | baseCurrentConsumption = 0.4f |
| |
|
static constexpr float | maxCurrentConsumption = 2.7f - baseCurrentConsumption |
| |
|
static constexpr float | ampPerLed = maxCurrentConsumption / (float)LED_COUNT |
| |
|
static constexpr uint8_t | BASE_SOFTWARE_VERSION_MAJOR = 1 |
| | Base major software version, common to all systems. increment for every release.
|
| |
|
static constexpr uint8_t | BASE_SOFTWARE_VERSION_MINOR = 8 |
| | Base minor software version, common to all systems. increment for every release.
|
| |
|
static constexpr uint8_t | ADC_RES_EXP = 12 |
| | resolution of the ADC, in bits (can be 8, 10, 12 or 14)
|
| |
|
static const uint32_t | ADC_MAX_VALUE = static_cast<uint32_t>(pow(2, ADC_RES_EXP)) |
| | corresponding ADC max value
|
| |
|
static constexpr float | internalReferenceVoltage = 3.0f |
| | internal voltage reference
|
| |
|
static constexpr uint8_t | batteryCount = 3 |
| | number of batteries for this model
|
| |
|
static constexpr float | imuToCircuitRotationX_rad = 0.0f * c_degreesToRadians |
| |
|
static constexpr float | imuToCircuitRotationY_rad = 0.0f * c_degreesToRadians |
| |
|
static constexpr float | imuToCircuitRotationZ_rad = -9.0f * c_degreesToRadians |
| |
|
static constexpr float | imuToCircuitPositionX_m = 8.915f / 1000.0f |
| |
|
static constexpr float | imuToCircuitPositionY_m = -5.769f / 1000.0f |
| |
|
static constexpr float | imuToCircuitPositionZ_m = 0.0f / 1000.0f |
| |
|
static constexpr float | batteryChargeC_Rate = 0.33f |
| | Maximum charge rate.
|
| |
|
static constexpr float | batteryDischargeC_Rate = 1.0f |
| | Typical discharge rate.
|
| |
|
static constexpr uint32_t | batteryCapacity_mAH = 4850 |
| | Battery capacity, in mA*hours.
|
| |
|
static constexpr uint16_t | minLiionVoltage_mV = 2500 |
| | minimum Li-ion voltage
|
| |
|
static constexpr uint16_t | typicalLiionVoltage_mV = 3630 |
| | standard 50% charge Li-ion voltage
|
| |
|
static constexpr uint16_t | maxLiionVoltage_mV = 4200 |
| | Absolute maximum allowed Li-ion voltage.
|
| |
|
static constexpr uint16_t | minSafeLiionVoltage_mV = 3100 |
| | minimum allowed li-ion voltage safe zone
|
| |
|
static constexpr uint16_t | maxSafeLiionVoltage_mV = 4100 |
| | maximum allowed li-ion voltage safe zone
|
| |
| static constexpr uint16_t | minSingularBatteryVoltage_mV |
| | with added margins to avoid wrong detection
|
| |
| static constexpr uint16_t | maxSingularBatteryVoltage_mV |
| | with added margins to avoid wrong detection
|
| |
|
static constexpr float | maxSystemTemp_c = 70.0f |
| | maximum microcontroler temperature, in degrees
|
| |
|
static constexpr float | criticalSystemTemp_c = 80.0f |
| | absolute maximum microcontroler temperature, in degrees
|
| |
|
static constexpr uint16_t | batteryCritical = 300 |
| | in % *100, critical battery level
|
| |
|
static constexpr uint16_t | batteryLow = 500 |
| | in % *100, low battery level
|
| |
|
static constexpr uint8_t | USER_WATCHDOG_ID = 0 |
| | user thread watchdog
|
| |
|
static constexpr uint8_t | POWER_WATCHDOG_ID = 2 |
| | power thread watchdog
|
| |
| static constexpr float | loopDeltaTime = MAIN_LOOP_UPDATE_PERIOD_MS / 1000.0f |
| | EXPECTED delta time for each loop run.
|
| |
|
static constexpr uint16_t | batteryMaxVoltage_mV = maxLiionVoltage_mV * batteryCount |
| | max voltage of a single li-ion cell
|
| |
|
static constexpr uint16_t | batteryMaxVoltageSafe_mV = maxSafeLiionVoltage_mV * batteryCount |
| | max voltage of a li-ion cell to maximise lifetime
|
| |
|
static constexpr uint16_t | batteryTypicalVoltageSafe_mV = typicalLiionVoltage_mV * batteryCount |
| | typical pack voltage
|
| |
|
static constexpr uint16_t | batteryMinVoltage_mV = minLiionVoltage_mV * batteryCount |
| | min voltage of a single li-ion cell
|
| |
|
static constexpr uint16_t | batteryMinVoltageSafe_mV = minSafeLiionVoltage_mV * batteryCount |
| | min voltage of a li-ion cell to maximise lifetime
|
| |
|
static constexpr float | totalCons_Watt = consWattByMeter * ledStripLength_mm / 1000.0f |
| | Total maximum power usage of the led strip.
|
| |
|
static constexpr float | maxStripConsumption_A = 1000.0f * totalCons_Watt / stripInputMaxVoltage_mV |
| | Maximum led strip current usage, in Amps.
|
| |
| static constexpr uint32_t | batteryMaxChargeCurrent_mA |
| | Battery maximum charge current, in milliAmps.
|
| |
| static constexpr uint32_t | batteryMaxDischargeCurrent_mA |
| | Battery maximum discharge current, in milliAmps.
|
| |
|
static constexpr uint32_t | batteryTypicalPower_mWH = batteryCapacity_mAH * batteryTypicalVoltageSafe_mV / 1000 |
| | Battery standard power, in milliWatt*Hours.
|
| |
|
static constexpr bool | usermodeDefaultsToLockdown = false |
| |
|
static constexpr float | c_PI = 3.1415926535897f |
| | PI constant.
|
| |
|
static constexpr float | c_TWO_PI = 6.2831853071795f |
| | 2*PI constant
|
| |
|
static constexpr float | c_HALF_PI = 1.5707963267948f |
| | PI/2 constant.
|
| |
|
static constexpr float | c_degreesToRadians = c_PI / 180.0f |
| | convert degrees to radians
|
| |
|
static constexpr uint8_t | USER_SOFTWARE_VERSION_MAJOR = 1 |
| |
|
static constexpr uint8_t | USER_SOFTWARE_VERSION_MINOR = 8 |
| |
|
static constexpr uint32_t | MAIN_LOOP_UPDATE_PERIOD_MS = static_cast<uint32_t>(1000 / 80.0f) |
| |
|
static constexpr float | consWattByMeter = 12 |
| |
|
static constexpr uint16_t | stripInputMinVoltage_mV = 9400 |
| |
|
static constexpr uint16_t | stripInputMaxVoltage_mV = 12000 |
| |
|
static constexpr float | ledStripLength_mm = 91.0f * 25.0f |
| |
|
static constexpr float | circuitToLedZeroRotationX_degrees = 0.0f |
| |
|
static constexpr float | circuitToLedZeroRotationY_degrees = 0.0f |
| |
|
static constexpr float | circuitToLedZeroRotationZ_degrees = 88.0f |
| |
|
static constexpr float | lampBodyRadius_mm = 25 |
| |
|
static constexpr uint16_t | LED_COUNT = 870 |
| |
|
static constexpr float | ledByMeter = 244 |
| |
|
static constexpr float | ledStripWidth_mm = 5.2f |
| |
|
static constexpr float | ledStripHeigh_mm = 0.7f |
| |
|
static constexpr uint8_t | minimumAllowedBrightness_8 = 3 |
| |
|
static constexpr float | ledSize_mm = 1000.0f / ledByMeter |
| |
|
static constexpr float | lampBodyCircumpherence_mm = c_TWO_PI * lampBodyRadius_mm |
| |
|
static constexpr float | ledPerTurn = lampBodyCircumpherence_mm / ledSize_mm |
| |
|
static constexpr float | lampHeight = ledStripWidth_mm * LED_COUNT / ledPerTurn |
| |
|
static constexpr float | stripXCoordinates = lampBodyCircumpherence_mm / ledSize_mm |
| |
|
static constexpr float | stripYCoordinates = ledStripLength_mm / lampBodyCircumpherence_mm |
| |
|
static constexpr float | lampBodyHeight_mm = stripYCoordinates * ledStripWidth_mm |
| |
|
constexpr uint16_t | stripMatrixWidth = ceil(stripXCoordinates) |
| |
|
constexpr uint16_t | stripMatrixHeight = ceil(stripYCoordinates) |
| |