I am making very nice progress and my embedded JVM platform now passes all the tests in the integration suite with a few exceptions based on known JVM limitations
Now I am getting ready to deploy Boo apps to actual devices
What I have is a Java supclass called 'Arduino' which is an implementation of the Arduino keywords and functions allowing these to be called from Boo
An example looks like this
import muvium.compatibility.arduino
class Blink(Arduino):
def setup():
pinMode( 13, HIGH)
def loop():
for vout in (HIGH,LOW):
digitalWrite( 13, vout)
delay(500)
The problem is it doesn't compile and i get the following errors
..\..\temp\Build\Blink.boo(4,22): BCE0005: Unknown identifier: 'HIGH'.
..\..\temp\Build\Blink.boo(6,22): BCE0005: Unknown identifier: 'HIGH'.
..\..\temp\Build\Blink.boo(6,27): BCE0005: Unknown identifier: 'LOW'.
If I manually insert the constants, it compiles fine
import muvium.compatibility.arduino
class Blink(Arduino):
final HIGH = 1
final LOW = 0
def setup():
pinMode( 13, HIGH)
def loop():
for vout in (HIGH,LOW):
digitalWrite( 13, vout)
delay(500)
It seems the Boo jar scanner finds the superclass methods but not the superclass constants. which are declared as follows in the superclass
public static final int HIGH = 1;
public static final int LOW = 0;
public static final int OUTPUT = 0;
public static final int INPUT = 1;
Any suggestions on working around this, I suppose I can inject the necessary constants as a temporary workaround.
Thanks,
James