* Start PWM after adc irq fully done * Filter len 4 * Use comparitor 2 on timer for wrap around * Update IRQ.cpp * Tip measurements are uint16_t Update BSP.cpp Update BSP.cpp * WiP PID move pid tuning to config Update PIDThread.cpp * Handle PWM Timer gitchy comparitor * Tuning * Dampen with Kd * Cleaning up * Use TemperatureType_t for getTipTemp() * Add small rolling average to user GUI temp to reduce flicker * Trigger PID when adc is skipped (will use old values)
30 lines
552 B
C
30 lines
552 B
C
#include "stdint.h"
|
|
/*
|
|
* BSP_Power.h -- Board Support for Power control
|
|
*
|
|
* These functions are hooks used to allow for power control
|
|
*
|
|
*/
|
|
|
|
#ifndef BSP_POWER_H_
|
|
#define BSP_POWER_H_
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// Called periodically in the movement handling thread
|
|
// Can be used to check any details for the power system
|
|
void power_check();
|
|
|
|
// Returns the tip resistance in x10 ohms, so 7.5 = 75; 14=140 etc
|
|
uint8_t getTipResistanceX10();
|
|
|
|
uint16_t getTipThermalMass();
|
|
uint16_t getTipInertia();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|