#ifndef PID_H
#define PID_H

#include <ArduinoLog.h>
#include "config.h"
#include <osr-base.h>
#include <App.h>
#include <Addon.h>
#include <Component.h>
#include "types.h"

class PID : public Component
{

public:
    PID(Component *owner) : Component("PID", 0, Component::COMPONENT_DEFAULT, owner),
                            channel(-1),
                            _SP(200),
                            _PV(100)
    {
        //setFlag(OBJECT_RUN_FLAGS::E_OF_DEBUG);
    }

    int runFoo()
    {
        Log.verboseln("Foo");
        return E_OK;
    }

    int getSP()
    {
        return _SP;
    }

    void setSP(int value)
    {
        _SP = value;
    }

    int getPV()
    {
        return _PV;
    }

    void setPV(int value)
    {
        _PV = value;
    }

    int channel;    
    int _SP;
    int _PV;
    
};

#endif
