The subsystem design/basis for the final project

Dependencies:   mbed-rtos mbed-src pixylib

PeriodicPI.h

Committer:
balsamfir
Date:
2016-03-25
Revision:
5:f655435d0782
Child:
6:52686c25e4af

File content as of revision 5:f655435d0782:

#ifndef PERIODIC_PI_H
#define PERIODIC_PI_H

#include "mbed.h"



class PeriodicPI
{
public:
    PeriodicPI(float periodSec, float kP=0, float kI=0);
    float Run(float error, float timeSec, float bound);
    float GetIntegral();
    float GetOutput();
    
    float kP;
    float kI;

private:
    float integral;
    float output;
    float periodSec;

};

#endif // PERIODIC_PI_H