The attached bit of code will compile and run with V 0.34.0
but will not compile under V035.0.
I have uploaded other bits of code under V0.35.0 no probs, but not this bit of code.
Board type Freetronics EtherMega ( Aust )
I am running windows 10 and all the XOD dependencies are up to date.
Begin compiling code for the board Arduino Mega or Mega 2560
C:\Users\denis\AppData\Local\Temp\xod_temp_sketchbook20EI12\xod_1600164137954_sketch\xod_1600164137954_sketch.ino: In member function ‘void xod::xod__common_hardware__ds18b20_thermometer::Node<constant_input_PORT>::evaluate(xod::xod__common_hardware__ds18b20_thermometer::Node<constant_input_PORT>::Context)’:
C:\Users\denis\AppData\Local\Temp\xod_temp_sketchbook20EI12\xod_1600164137954_sketch\xod_1600164137954_sketch.ino:2843:40: error: ‘port’ was not declared in this scope
bool success = readTemperature(port, &tc);
^~~~
Error during build: exit status 1
Compilation failed
Command Process exited with code 1
The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers.
Thank you for your quick reply.
The code now compiles and uploads no errors with the message “Uploaded Successfully” but the code doesn’t run.
I can reinstall 0.34.0 upload the program and it works fine.
It looks like the problem still exists in version 0.35.2
Begin compiling code for the board Arduino Mega or Mega 2560
C:\Users\15FC~1.-\AppData\Local\Temp\xod_temp_sketchbookP3TJLB\xod_1600522652947_sketch\xod_1600522652947_sketch.ino:4519:5: error: initializer for flexible array member ‘uint8_t xod::txgruppi__stepper_28byj48__stepper_28byj48_controller::Node::positions []’
};
^
Error during build: exit status 1
Compilation failed
Command Process exited with code 1
The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers.
@seralex thank you for this bug report. I confirm, that the bug introduced in the 0.35.0 version. However, we don’t plan to fix it until get more similar bug reports with the third-party libraries, because this fix is not so trivial. But there are some solutions:
Ask @txgruppi to publish a new version of the library after fixing the bug or migrate the implementation to new version.
To fix it you need just specify a size of array by replacing the line uint8_t positions[] = { with uint8_t positions[8] = {.
If there is no response from library creator you can make a fork of the library with the suggested fix and publish it. Or just copy used node, make a fix, and use it in your project only