Co dělám špatně, že mi hlásí knihovna chybu při deklaraci lokálních parametrů prvku pole.
StepperSerial,cpp
Kód: Vybrať všetko
#include <Arduino.h>
#include "SerialStepper.h"
SerialStepper::SerialStepper(byte pin_STC,
byte pin_SHCP,
byte pin_DS,
byte pocet_M,
byte motory[],
byte smerM[])
{
byte _pin_STC = pin_STC; // OK
byte _pin_SHCP = pin_SHCP; // OK
byte _pin_DS = pin_DS; // OK
byte _pocet_M = pocet_M; // OK
byte _motory[] = motory[]; // tu to hlasi chybu
byte _smerM[] = smerM[]; // tu to hlasi chybu
}
Kód: Vybrať všetko
#ifndef SerialStepper_h
#define SerialStepper_h
#include "Arduino.h"
class SerialStepper
{
public:
SerialStepper (byte pin_STC,
byte pin_SHCP,
byte pin_DS,
byte pocet_M,
byte motory[],
byte smerM[]);
private:
};
Děkuji