aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control/PIDAlgo.h
blob: 4792be9ecd32f739ce674fc1c0744a0ddf51993c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef MODULES_PIDALGO_H_
#define MODULES_PIDALGO_H_
#include <stdint.h>

typedef struct
{
    float epsilon;
    float dt;
    float MAX;
    float MIN;
    float Kp;
    float Kd;
    float Ki;
    float IntegralErrorMultiplier;
    float ProportionalErrorMultiplier;

}PID_Config_Params;
float PIDAlgorithmCalculation(float _setPoint,float _mesuredParam , PID_Config_Params *params, float *_pre_error, float *_integral);
float AdvancedPIDAlgorithmCalculation(float _setPoint,float _mesuredParam , PID_Config_Params *params, float *_pre_error, float *_integral);

#endif /* MODULES_PIDALGO_H_ */
">system_reset_request__get_packed_size (const SystemResetRequest *message) { assert(message->base.descriptor == &system_reset_request__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t system_reset_request__pack (const SystemResetRequest *message, uint8_t *out) { assert(message->base.descriptor == &system_reset_request__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t system_reset_request__pack_to_buffer (const SystemResetRequest *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &system_reset_request__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } SystemResetRequest * system_reset_request__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { return (SystemResetRequest *) protobuf_c_message_unpack (&system_reset_request__descriptor, allocator, len, data); } void system_reset_request__free_unpacked (SystemResetRequest *message, ProtobufCAllocator *allocator) { if(!message) return; assert(message->base.descriptor == &system_reset_request__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } #define system_reset_request__field_descriptors NULL #define system_reset_request__field_indices_by_name NULL #define system_reset_request__number_ranges NULL const ProtobufCMessageDescriptor system_reset_request__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "SystemResetRequest", "SystemResetRequest", "SystemResetRequest", "", sizeof(SystemResetRequest), 0, system_reset_request__field_descriptors, system_reset_request__field_indices_by_name, 0, system_reset_request__number_ranges, (ProtobufCMessageInit) system_reset_request__init, NULL,NULL,NULL /* reserved[123] */ };