Hola todos
Necesito ayuda para "corregir" errores que tengo al crear una clase muy sencilla.
intentare pegar aqui los .h y .cpp
La clase es muy sencilla y da error.
aqui en .h
#include "Arduino.h"
#include <inttypes.h>
#include <Ethernet.h>
#ifndef runStack_h
#define runStack_h
class RunStack
{
public:
RunStack();
// Turn the led on for a given amount of time (relies
// on a call to check() in the main loop()).
void setTime(long millis);
virtual void check( EthernetClient t );
private:
int _priority;
long _lasTime;
};
// extern RunStack;
#endif
y aqui el .cpp
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "Arduino.h"
#include "RunStack.h"
RunStack::RunStack(){
this->_lasTime = 0;
};
void Runstack::setTime(long millis){
this->_lasTime = millis ;
};
void Runstack::check( EthernetClient t ){
};
el mensaje de error es:
Arduino: 1.5.5 (Windows 7), Placa:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
RunStack.cpp:10: error: 'Runstack' has not been declared
RunStack.cpp: In function 'void setTime(long int)':
RunStack.cpp:11: error: invalid use of 'this' in non-member function
RunStack.cpp: At global scope:
RunStack.cpp:14: error: 'Runstack' has not been declared
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Cualquier ayuda será agradecida
saludos
jmdc