![]() |
Open FFBoard
Open source force feedback firmware
|
Go to the source code of this file.
Functions | |
| void | setVSenseMult (float vSenseMultiplier) |
| void | setupBrakePin (int32_t vdiffAct, int32_t vdiffDeact, int32_t vMax) |
| float | adcValToVoltage (uint32_t adcval) |
| int32_t | getIntV () |
| int32_t | getExtV () |
| void | brakeCheck () |
| __weak int32_t | getChipTemp () |
Variables | |
| bool | braking_flag = false |
| int32_t | maxVoltage = 65000 |
| int32_t | voltageDiffActivate = 5000 |
| int32_t | voltageDiffDeactivate = 4000 |
| float | vSenseMult = VOLTAGE_MULT_DEFAULT |
| bool | brake_failure = false |
| int32_t | minVoltage = 6500 |
| uint32_t | brakeActiveTime = 0 |
| const Error | resError = Error(ErrorCode::brakeResistorFailure, ErrorType::critical, "Brake resistor stuck on") |
| FastMovingAverage< int32_t > | chipTempAvg {3} |
| float adcValToVoltage | ( | uint32_t | adcval | ) |
Converts an adc reading to millivolts using the internal calibration and reference voltage Requires ADC_INTREF_VOL and VSENSE_ADC_RES
Definition at line 46 of file voltagesense.cpp.
| void brakeCheck | ( | ) |
Definition at line 62 of file voltagesense.cpp.
| __weak int32_t getChipTemp | ( | ) |
Helper function implementation for getting the chip temperature if read via internal ADC channel __weak defined and can be overridden in chip dependent code
Definition at line 96 of file voltagesense.cpp.
| int32_t getExtV | ( | ) |
Definition at line 58 of file voltagesense.cpp.
| int32_t getIntV | ( | ) |
Definition at line 53 of file voltagesense.cpp.
| void setupBrakePin | ( | int32_t | vdiffAct, |
| int32_t | vdiffDeact, | ||
| int32_t | vMax ) |
Definition at line 40 of file voltagesense.cpp.
| void setVSenseMult | ( | float | vSenseMultiplier | ) |
Definition at line 29 of file voltagesense.cpp.
| bool brake_failure = false |
Definition at line 20 of file voltagesense.cpp.
| uint32_t brakeActiveTime = 0 |
Definition at line 23 of file voltagesense.cpp.
| bool braking_flag = false |
Definition at line 15 of file voltagesense.cpp.
| FastMovingAverage<int32_t> chipTempAvg {3} |
Definition at line 95 of file voltagesense.cpp.
| int32_t maxVoltage = 65000 |
Definition at line 16 of file voltagesense.cpp.
| int32_t minVoltage = 6500 |
Definition at line 21 of file voltagesense.cpp.
| const Error resError = Error(ErrorCode::brakeResistorFailure, ErrorType::critical, "Brake resistor stuck on") |
Definition at line 24 of file voltagesense.cpp.
| int32_t voltageDiffActivate = 5000 |
Definition at line 17 of file voltagesense.cpp.
| int32_t voltageDiffDeactivate = 4000 |
Definition at line 18 of file voltagesense.cpp.
| float vSenseMult = VOLTAGE_MULT_DEFAULT |
Definition at line 19 of file voltagesense.cpp.