After adding #define CUSTOM_EVENTS there is some error in compiling:
exit status 1
'firstMove' is not a member of 'LaserDriver'
Edit. solved...just define CUSTOM_EVENTS upper than laser section...of course...
Problem N°2:
exit status 1
'newint' was not declared in this scope
on row:
#if defined(GAMMA_CORRECTION) && (GAMMA_CORRECTION==true)
newint =(com->S);
if (Gamma_on)
{
Outval=pow(newintens/LASER_PWM_MAX,GAMMA)*LASER_PWM_MAX; //Gamma function
LaserDriver::intensity = map((int)Outval,0,LASER_PWM_MAX,LASER_BASE_OFFSET,LASER_LIMIT);// scale gamma function and offset to max
Com::printFLN(PSTR("orig:"),(int)newintens);
}
else
{
Outval=newintens;
LaserDriver::intensity = map((int)Outval,0,LASER_PWM_MAX,LASER_BASE_OFFSET,LASER_LIMIT);// scale offset to max
Com::printFLN(PSTR("Gamma off LV:"),(int)newintens);
}
declaring it, it will compile the code, but i don't think that is a good solution...
Maybe i can declare it at the start of the file?
int newint = 0;