![]() |
Speeduino
|
#include "../../pins/boardOutputPin.h"#include "../../../globals.h"#include "../../../unit_testing.h"#include "../../../units.h"#include "../../PID/integerPID_ideal.h"#include "../../../timers.h"#include "../../pwm/PwmOutputChannel.h"#include "src/pwm/interruptHandlers.h"Enumerations | |
| enum class | BoostByGearMode : uint8_t { Off , Percent , Constant } |
Functions | |
| static constexpr uint16_t | percentToHalfPct (uint16_t percent) |
| static constexpr uint16_t | percentToDuty (uint16_t percent) |
| static void | setBoostPidTunings (const config2 &page2, const config6 &page6, const config10 &page10) noexcept |
| void | initialiseBoost (statuses ¤t, const config2 &page2, const config6 &page6, const config10 &page10, const pinNumbers_t &pins) |
| Initialise the boost controller. | |
| static uint16_t | getBoostByGearFactor (const statuses ¤t, const config9 &page9) noexcept |
| static BoostByGearMode | getBoostByGearMode (const config2 &page2, const config9 &page9) |
| static uint16_t | lookupBoostTable (const statuses ¤t) noexcept |
| static uint16_t | getBoostDuty (const statuses ¤t, const config2 &page2, const config9 &page9) |
| static uint16_t | getBoostTarget (const statuses ¤t, const config2 &page2, const config9 &page9) |
| static int16_t | getFlexCorrection (const statuses ¤t, const config2 &page2) |
| static uint16_t | convertTargetToDuty (const statuses ¤t, const config2 &page2, const config6 &page6, const config10 &page10) |
| static void | applyDutyToPwm (const statuses ¤t) |
| static bool | isBoostActive (const statuses ¤t, const config6 &page6) |
| static bool | isBoostControlBaroActive (const statuses ¤t, const config15 &page15) |
| static bool | isBoostControlFixedActive (const statuses ¤t, const config15 &page15) |
| TESTABLE_STATIC void | boostControlCore (statuses ¤t, const config2 &page2, const config4 &page4, const config6 &page6, const config9 &page9, const config10 &page10, const config15 &page15) |
| void | boostControl (statuses ¤t, const config2 &page2, const config4 &page4, const config6 &page6, const config9 &page9, const config10 &page10, const config15 &page15) |
| Run the boost control algorithm. Should be called periodically from the main loop. | |
| void | boostInterrupt (void) |
| Boost timer ISR. The board needs to hook this into a timer. | |
Variables | |
| TESTABLE_STATIC PwmOutputChannel< boardOutputPin_t > | boostOutput |
| TESTABLE_STATIC integerPID_ideal | boostPID |
| TESTABLE_CONSTEXPR table2D_u8_s16_6 flexBoostTable & | configPage10 |
|
strong |
|
static |
| void boostControl | ( | statuses & | current, |
| const config2 & | page2, | ||
| const config4 & | page4, | ||
| const config6 & | page6, | ||
| const config9 & | page9, | ||
| const config10 & | page10, | ||
| const config15 & | page15 | ||
| ) |
Run the boost control algorithm. Should be called periodically from the main loop.
| current | System state |
| page2 | Tune |
| page4 | Tune |
| page6 | Tune |
| page9 | Tune |
| page10 | Tune |
| page15 | Tune |
| TESTABLE_STATIC void boostControlCore | ( | statuses & | current, |
| const config2 & | page2, | ||
| const config4 & | page4, | ||
| const config6 & | page6, | ||
| const config9 & | page9, | ||
| const config10 & | page10, | ||
| const config15 & | page15 | ||
| ) |
| void boostInterrupt | ( | void | ) |
Boost timer ISR. The board needs to hook this into a timer.
|
static |
|
staticnoexcept |
|
inlinestatic |
|
static |
|
static |
| void initialiseBoost | ( | statuses & | current, |
| const config2 & | page2, | ||
| const config6 & | page6, | ||
| const config10 & | page10, | ||
| const pinNumbers_t & | pins | ||
| ) |
Initialise the boost controller.
| current | System state |
| page2 | Tune |
| page6 | Tune |
| page10 | Tune |
| pins | Board pin numbers |
|
inlinestatic |
|
inlinestatic |
|
inlinestaticnoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticnoexcept |
| TESTABLE_STATIC PwmOutputChannel<boardOutputPin_t> boostOutput |
| TESTABLE_STATIC integerPID_ideal boostPID |
|
constexpr |