в следующей строке
Код: Выделить всё
Sensor(String type, float adjustment, devPort port) {Я тоже пробовал
Код: Выделить всё
Sensor(String type, float adjustment, devPort::devPort port)Код: Выделить всё
class devPort { // There will be 10 'Port's, all pre-defined as unavailable until the boardtype is known
public:
devPort(String name, int pin1, int pin2, int mode) {
this->name = name;
this->pin1 = pin1;
this->pin2 = pin2;
this->mode = mode;
}
String name;
int pin1;
int pin2;
int mode; // -1 = Disabled, 0 = SDA/SCL, 1=DAC, 2=ADC, 3=GPIO
};
// The 'Sensor's will be stored in the flash memory
class Sensor {
public:
Sensor(String type, float adjustment, devPort port) { // type = type;
this->adjustment = adjustment;
this->port = port;
}
String type; // Derived from *sensorTypes
float adjustment; // +/- adjustment value
devPort port; // Custom Port
};
Подробнее здесь: https://stackoverflow.com/questions/782 ... ching-func
Мобильная версия