初始化提交
This commit is contained in:
178
boards/default_src/micropython_esp32c2/index.js
Normal file
178
boards/default_src/micropython_esp32c2/index.js
Normal file
@@ -0,0 +1,178 @@
|
||||
import * as Blockly from 'blockly/core';
|
||||
import { Profile } from 'mixly';
|
||||
|
||||
import {
|
||||
PythonVariablesBlocks,
|
||||
PythonControlBlocks,
|
||||
PythonMathBlocks,
|
||||
PythonTextBlocks,
|
||||
PythonListsBlocks,
|
||||
PythonDictsBlocks,
|
||||
PythonLogicBlocks,
|
||||
PythonStorageBlocks,
|
||||
PythonProceduresBlocks,
|
||||
PythonTupleBlocks,
|
||||
PythonSetBlocks,
|
||||
PythonHtmlBlocks,
|
||||
PythonUtilityBlocks,
|
||||
PythonVariablesGenerators,
|
||||
PythonControlGenerators,
|
||||
PythonMathGenerators,
|
||||
PythonTextGenerators,
|
||||
PythonListsGenerators,
|
||||
PythonDictsGenerators,
|
||||
PythonLogicGenerators,
|
||||
PythonStorageGenerators,
|
||||
PythonProceduresGenerators,
|
||||
PythonTupleGenerators,
|
||||
PythonSetGenerators,
|
||||
PythonHtmlGenerators,
|
||||
PythonUtilityGenerators,
|
||||
Procedures,
|
||||
Variables,
|
||||
Python
|
||||
} from '@mixly/python';
|
||||
|
||||
import {
|
||||
MicroPythonActuatorExternBlocks,
|
||||
MicroPythonActuatorOnBoardBlocks,
|
||||
MicroPythonAISensorBlocks,
|
||||
MicroPythonAIBlocks,
|
||||
MicroPythonBlynkBlocks,
|
||||
MicroPythonCCG1Blocks,
|
||||
MicroPythonCEGOBlocks,
|
||||
MicroPythonCommunicateBlocks,
|
||||
MicroPythonDisplayExternBlocks,
|
||||
MicroPythonDisplayOnBoardBlocks,
|
||||
MicroPythonFactoryBlocks,
|
||||
MicroPythonInputBlocks,
|
||||
MicroPythonIotBlocks,
|
||||
MicroPythonNetworkBlocks,
|
||||
MicroPythonSensorExternBlocks,
|
||||
MicroPythonSensorOnBoardBlocks,
|
||||
MicroPythonSerialBlocks,
|
||||
MicroPythonSystemBlocks,
|
||||
MicroPythonWeatherBlocks,
|
||||
MicroPythonActuatorExternGenerators,
|
||||
MicroPythonActuatorOnBoardGenerators,
|
||||
MicroPythonAISensorGenerators,
|
||||
MicroPythonAIGenerators,
|
||||
MicroPythonBlynkGenerators,
|
||||
MicroPythonCCG1Generators,
|
||||
MicroPythonCEGOGenerators,
|
||||
MicroPythonCommunicateGenerators,
|
||||
MicroPythonDisplayExternGenerators,
|
||||
MicroPythonDisplayOnBoardGenerators,
|
||||
MicroPythonFactoryGenerators,
|
||||
MicroPythonInputGenerators,
|
||||
MicroPythonIotGenerators,
|
||||
MicroPythonNetworkGenerators,
|
||||
MicroPythonSensorExternGenerators,
|
||||
MicroPythonSensorOnBoardGenerators,
|
||||
MicroPythonSerialGenerators,
|
||||
MicroPythonSystemGenerators,
|
||||
MicroPythonWeatherGenerators
|
||||
} from '@mixly/micropython';
|
||||
|
||||
import {
|
||||
MicropythonESP32C2Pins,
|
||||
MicropythonESP32C2InoutBlocks,
|
||||
MicropythonESP32C2MEG1Blocks,
|
||||
MicropythonESP32C2MEGOBlocks,
|
||||
MicropythonESP32C2PinsBlocks,
|
||||
MicropythonESP32C2InoutGenerators,
|
||||
MicropythonESP32C2MEG1Generators,
|
||||
MicropythonESP32C2MEGOGenerators,
|
||||
MicropythonESP32C2PinsGenerators
|
||||
} from './';
|
||||
|
||||
import './css/color_esp32c3_mixgocc.css';
|
||||
|
||||
Object.assign(Blockly.Variables, Variables);
|
||||
Object.assign(Blockly.Procedures, Procedures);
|
||||
Blockly.Python = Python;
|
||||
Blockly.generator = Python;
|
||||
|
||||
Profile.default = {};
|
||||
Object.assign(Profile, MicropythonESP32C2Pins);
|
||||
Object.assign(Profile.default, MicropythonESP32C2Pins['MixGo CC']);
|
||||
|
||||
Object.assign(
|
||||
Blockly.Blocks,
|
||||
PythonVariablesBlocks,
|
||||
PythonControlBlocks,
|
||||
PythonMathBlocks,
|
||||
PythonTextBlocks,
|
||||
PythonListsBlocks,
|
||||
PythonDictsBlocks,
|
||||
PythonLogicBlocks,
|
||||
PythonStorageBlocks,
|
||||
PythonProceduresBlocks,
|
||||
PythonTupleBlocks,
|
||||
PythonSetBlocks,
|
||||
PythonHtmlBlocks,
|
||||
PythonUtilityBlocks,
|
||||
MicroPythonInputBlocks,
|
||||
MicroPythonSystemBlocks,
|
||||
MicroPythonSerialBlocks,
|
||||
MicroPythonCommunicateBlocks,
|
||||
MicroPythonIotBlocks,
|
||||
MicroPythonWeatherBlocks,
|
||||
MicroPythonAISensorBlocks,
|
||||
MicroPythonSensorOnBoardBlocks,
|
||||
MicroPythonSensorExternBlocks,
|
||||
MicroPythonNetworkBlocks,
|
||||
MicroPythonAIBlocks,
|
||||
MicroPythonActuatorOnBoardBlocks,
|
||||
MicroPythonActuatorExternBlocks,
|
||||
MicroPythonDisplayOnBoardBlocks,
|
||||
MicroPythonDisplayExternBlocks,
|
||||
MicroPythonFactoryBlocks,
|
||||
MicroPythonBlynkBlocks,
|
||||
MicroPythonCCG1Blocks,
|
||||
MicroPythonCEGOBlocks,
|
||||
MicropythonESP32C2InoutBlocks,
|
||||
MicropythonESP32C2MEG1Blocks,
|
||||
MicropythonESP32C2MEGOBlocks,
|
||||
MicropythonESP32C2PinsBlocks
|
||||
);
|
||||
|
||||
Object.assign(
|
||||
Blockly.Python.forBlock,
|
||||
PythonVariablesGenerators,
|
||||
PythonControlGenerators,
|
||||
PythonMathGenerators,
|
||||
PythonTextGenerators,
|
||||
PythonListsGenerators,
|
||||
PythonDictsGenerators,
|
||||
PythonLogicGenerators,
|
||||
PythonStorageGenerators,
|
||||
PythonProceduresGenerators,
|
||||
PythonTupleGenerators,
|
||||
PythonSetGenerators,
|
||||
PythonHtmlGenerators,
|
||||
PythonUtilityGenerators,
|
||||
MicroPythonInputGenerators,
|
||||
MicroPythonSystemGenerators,
|
||||
MicroPythonSerialGenerators,
|
||||
MicroPythonCommunicateGenerators,
|
||||
MicroPythonIotGenerators,
|
||||
MicroPythonWeatherGenerators,
|
||||
MicroPythonAISensorGenerators,
|
||||
MicroPythonSensorOnBoardGenerators,
|
||||
MicroPythonSensorExternGenerators,
|
||||
MicroPythonNetworkGenerators,
|
||||
MicroPythonAIGenerators,
|
||||
MicroPythonActuatorOnBoardGenerators,
|
||||
MicroPythonActuatorExternGenerators,
|
||||
MicroPythonDisplayOnBoardGenerators,
|
||||
MicroPythonDisplayExternGenerators,
|
||||
MicroPythonFactoryGenerators,
|
||||
MicroPythonBlynkGenerators,
|
||||
MicroPythonCCG1Generators,
|
||||
MicroPythonCEGOGenerators,
|
||||
MicropythonESP32C2InoutGenerators,
|
||||
MicropythonESP32C2MEG1Generators,
|
||||
MicropythonESP32C2MEGOGenerators,
|
||||
MicropythonESP32C2PinsGenerators
|
||||
);
|
||||
Reference in New Issue
Block a user