mita
mita copied to clipboard
Allow read-only access to configuration items
At the moment users cannot access configuration items (e.g. the sensor range of an accelerometer) in their code. We should allow fully-qualified, read-only access to configuration items, similar to VCI. For example:
package main;
import platforms.xdk110;
setup accelerometer {
range = BMA280_8g;
}
setup foonet : WLAN {
PSK = "foonet";
SSID = "blabla";
}
every WLAN.connected {
if(foonet.useDHCP) {
print("Connected using dynamic address\n");
}
}
every 100 milliseconds {
if(accelerometer.range == BMA280Range.BMA280_8g) {
// do something
}
}