limited support for RGB led
This commit is contained in:
@@ -13,6 +13,7 @@ namespace pxsim {
|
||||
buttonPairState: ButtonPairState;
|
||||
radioState: RadioState;
|
||||
neopixelState: NeoPixelState;
|
||||
rgbLedState: number;
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
@@ -48,7 +49,7 @@ namespace pxsim {
|
||||
0,
|
||||
0,
|
||||
DAL.MICROBIT_ID_IO_P19,
|
||||
DAL.MICROBIT_ID_IO_P20
|
||||
DAL.MICROBIT_ID_IO_P20
|
||||
]
|
||||
});
|
||||
this.builtinParts["radio"] = this.radioState = new RadioState(runtime);
|
||||
@@ -61,11 +62,11 @@ namespace pxsim {
|
||||
|
||||
this.builtinVisuals["buttonpair"] = () => new visuals.ButtonPairView();
|
||||
this.builtinVisuals["ledmatrix"] = () => new visuals.LedMatrixView();
|
||||
this.builtinVisuals["neopixel"] = () => new visuals.NeoPixelView();
|
||||
this.builtinVisuals["neopixel"] = () => new visuals.NeoPixelView();
|
||||
|
||||
this.builtinPartVisuals["buttonpair"] = (xy: visuals.Coord) => visuals.mkBtnSvg(xy);
|
||||
this.builtinPartVisuals["ledmatrix"] = (xy: visuals.Coord) => visuals.mkLedMatrixSvg(xy, 8, 8);
|
||||
this.builtinPartVisuals["neopixel"] = (xy: visuals.Coord) => visuals.mkNeoPixelPart(xy);
|
||||
this.builtinPartVisuals["neopixel"] = (xy: visuals.Coord) => visuals.mkNeoPixelPart(xy);
|
||||
}
|
||||
|
||||
receiveMessage(msg: SimulatorMessage) {
|
||||
@@ -97,7 +98,7 @@ namespace pxsim {
|
||||
const cmpDefs = msg.partDefinitions || {};
|
||||
const fnArgs = msg.fnArgs;
|
||||
|
||||
const opts : visuals.BoardHostOpts = {
|
||||
const opts: visuals.BoardHostOpts = {
|
||||
state: this,
|
||||
boardDef: boardDef,
|
||||
partsList: cmpsList,
|
||||
|
||||
Reference in New Issue
Block a user