-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.h
More file actions
40 lines (33 loc) · 741 Bytes
/
controller.h
File metadata and controls
40 lines (33 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* controller.h
*
* Created: 18.03.2017 16:06:03
* Author: Tanguy Simon for DNV GL Fuel fighter
*/
#ifndef CONTROLLER_H_
#define CONTROLLER_H_
#include <avr/io.h>
#include "pid.h"
#include "state_machine.h"
#include "motor_controller_selection.h"
#ifdef MOTOR_RE50_36V
#define R 0.244
#define L 0.000177
#define VOLT_SPEED_CST 158.0 //rmp/V
#endif
#ifdef MOTOR_RE50_48V
#define R 0.608
#define L 0.000423
#define VOLT_SPEED_CST 102.0 //rmp/V
#endif
#ifdef MOTOR_RE65_48V
#define R 0.365
#define L 0.000161
#define VOLT_SPEED_CST 77.8.0 //rmp/V
#endif
void reset_I(void) ;
void set_I(uint8_t duty) ;
void controller(volatile ModuleValues_t *vals);
void drivers(uint8_t b_state);
void drivers_init();
#endif /* CONTROLLER_H_ */