PID added desired height value to define
This commit is contained in:
parent
aa93a954d8
commit
5873b4326e
@ -37,6 +37,8 @@
|
|||||||
#define PID_MAX_I 256 /*Constrains ITerm*/
|
#define PID_MAX_I 256 /*Constrains ITerm*/
|
||||||
#define PID_MAX_D 512 /*Constrains DTerm*/
|
#define PID_MAX_D 512 /*Constrains DTerm*/
|
||||||
|
|
||||||
|
#define DESIRED_HEIGHT 5
|
||||||
|
|
||||||
/*Struct that belongs to a certain PID controller*/
|
/*Struct that belongs to a certain PID controller*/
|
||||||
typedef struct pidProfileBuff_s {
|
typedef struct pidProfileBuff_s {
|
||||||
|
|
||||||
@ -176,7 +178,7 @@ void getPointRate(float *desiredCommand, uint8_t ID_profile)
|
|||||||
|
|
||||||
//desiredCommand[THROTTLE] = convertData(RADIO_RANGE, BAROMETER_RANGE, 0, rc_input.Throttle*throttleRate);
|
//desiredCommand[THROTTLE] = convertData(RADIO_RANGE, BAROMETER_RANGE, 0, rc_input.Throttle*throttleRate);
|
||||||
|
|
||||||
desiredCommand[THROTTLE] = 5*BAROMETER_SCALE;
|
desiredCommand[THROTTLE] = DESIRED_HEIGHT*BAROMETER_SCALE;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user