SINTEF-9012 / JArduino

Program your Arduino in Java
https://github.com/SINTEF-9012/JArduino/wiki
176 stars 63 forks source link

firmware not functional when compiled from source #53

Closed lobsteroh closed 8 years ago

lobsteroh commented 8 years ago

took me a while to tack down this issue ... osx 10.11.4

JArduino firmware upload fails with

/Users/lobsterman/Documents/C_Arduino/Arduino/libraries/JArduino/examples/JArduinoFirmware/JArduinoFirmware.pde: In function 'void setup()':
JArduinoFirmware:87: error: no matching function for call to 'JArduino::init_JArduino()'

this only happens if i clone

https://github.com/SINTEF-9012/JArduino.git

then cd into it and mvn clean install, then copy

~/Documents/workspace/JArduino/jarduino.core/src/main/arduino into my Arduino libraries folder

however, if i use the JArduinoFirmware that comes with the binary distribution JArduino-0.1.7b.zip, then it works just fine.

brice-morin commented 8 years ago

OK, I suspect the problem to come from with default value on parameter:

void JArduino::init_JArduino(uint16_t baud = 9600) {
    // init the serial port
    Serial.begin(baud);
}

Try replacing with:

void JArduino::init_JArduino(void) {
    // init the serial port
    Serial.begin(9600);
}
lobsteroh commented 8 years ago

yes, confirming that fixing this in JArduino.cpp within Arduino/libraries makes the firmware work. thanks