Merge branch 'dev' into ui
This commit is contained in:
@@ -58,10 +58,11 @@ int led_get(uint8_t num);
|
||||
#define LOUDSPEAKER_PORT GPIOB
|
||||
#define LOUDSPEAKER_RCC_MASK RCC_AHB1ENR_GPIOBEN
|
||||
#define LOUDSPEAKER_PIN 1
|
||||
#define LOUDSPEAKER_MULTIFREQ 1
|
||||
|
||||
void loudspeaker_setup();
|
||||
void loudspeaker_set(int val);
|
||||
int loudspeaker_get();
|
||||
void loudspeaker_set(uint16_t val);
|
||||
uint16_t loudspeaker_get();
|
||||
|
||||
|
||||
#endif /* __DIGIO_H__ */
|
||||
|
@@ -28,4 +28,11 @@
|
||||
#define TEMP_CHANNEL_NUM (16)
|
||||
#define INT_REF_CHANNEL_NUM (17)
|
||||
|
||||
#define SAFETY_ADC_INT_REF_MV 1210.0f
|
||||
|
||||
#define SAFETY_ADC_TEMP_NOM 25.0f
|
||||
#define SAFETY_ADC_TEMP_NOM_MV 760.0f
|
||||
#define SAFETY_ADC_TEMP_MV_SLOPE 2.5f
|
||||
|
||||
|
||||
#endif /* __SAFETY_ADC_HWCFG_H__ */
|
||||
|
@@ -25,15 +25,19 @@ struct pid_controller {
|
||||
float k_deriv;
|
||||
float k_int;
|
||||
float k_p;
|
||||
float k_int_t;
|
||||
float k_deriv_t;
|
||||
float output_sat_max;
|
||||
float output_sat_min;
|
||||
float integral_max;
|
||||
float sample_period;
|
||||
volatile float control_output;
|
||||
volatile float last_in;
|
||||
volatile float integral;
|
||||
volatile float derivate;
|
||||
};
|
||||
|
||||
void pid_init(struct pid_controller *pid, float k_deriv, float k_int, float k_p, float output_sat_min, float output_sat_max, float integral_max);
|
||||
void pid_init(struct pid_controller *pid, float k_deriv, float k_int, float k_p, float output_sat_min, float output_sat_max, float integral_max, float sample_period);
|
||||
|
||||
void pid_zero(struct pid_controller *pid);
|
||||
|
||||
|
@@ -45,7 +45,7 @@ extern volatile uint32_t wait_tick_ms;
|
||||
* @brief Systemclock in milliseconds.
|
||||
*
|
||||
* This value must not be reset during the whole runtime.
|
||||
*
|
||||
* @warning In order to use this, you must assure that the read access is atomic.
|
||||
*/
|
||||
extern volatile uint64_t global_tick_ms;
|
||||
|
||||
|
Reference in New Issue
Block a user