/**
 * /MotorBroker.h
 * @version 1.0
 * @desc A driver class for the attached stepper motors
 * @author Fándly Gergő Zoltán (fandlygergo@gmail.hu, systemtest.tk)
 * @copy 2018 Fándly Gergő Zoltán
 * License:
    Firmware for the Profile F1 fertilizer machine.
    Copyright (C) 2018  Fándly Gergő Zoltán

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
 **/

#ifndef MOTORBROKER_H_INCLUDED
#define MOTORBROKER_H_INCLUDED

#include <Arduino.h>
#include "CheapMCPStepper.h"

class MotorBroker{
public:
    //constructor
    MotorBroker();

    //add MLs to extrude
    void addExtrude(float pump0, float pump1, float pump2, float pump3, float pump4);

    //run motors
    void run();

protected:
    CheapMCPStepper motors[5];
    //extrude in steps
    int extrude[5];

private:
    void initMotors();
};

#endif // MOTORBROKER_H_INCLUDED
