mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-21 15:19:48 +00:00
[update] electron-forge によるパッケージング,新ブロック i2c_read_word_data
This commit is contained in:
parent
7c545f8825
commit
6e5a45b6fb
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,3 +6,5 @@ build/
|
|||||||
*.bak
|
*.bak
|
||||||
*.old
|
*.old
|
||||||
|
|
||||||
|
|
||||||
|
out/
|
@ -1,6 +1,6 @@
|
|||||||
# ocoge
|
# ocoge
|
||||||
"大岩産 Code Generator" は、Google Blockly ライブラリを使用した、Raspberry Pi 上で動作するブロックプログラム開発・実行環境です。
|
"大岩産 Code Generator" は、Google Blockly ライブラリを使用した、Raspberry Pi 上で動作するブロックプログラム開発・実行環境です。
|
||||||
インストール方法・操作・サンプルなどは、『[おこげ倶楽部](https://ocoge.club)』または『[おこげはてな倶楽部](https://ocogeclub.hatenablog.jp)』にて公開予定です。
|
インストール方法・操作・サンプルなどは、『[PI.ICHIJU.IN](https://pi.ichiju.in)』にて公開予定です。
|
||||||
|
|
||||||
### 免責
|
### 免責
|
||||||
このアプリケーションは特定の環境下で使用する目的で、専門知識を持たない日曜プログラマによって無計画に開発されています。アドバイス・ご意見・ご要望は有難く承りますが、対応の保証はいたしかねます。
|
このアプリケーションは特定の環境下で使用する目的で、専門知識を持たない日曜プログラマによって無計画に開発されています。アドバイス・ご意見・ご要望は有難く承りますが、対応の保証はいたしかねます。
|
||||||
|
@ -441,6 +441,13 @@
|
|||||||
</shadow>
|
</shadow>
|
||||||
</value>
|
</value>
|
||||||
</block>
|
</block>
|
||||||
|
<block type="ugj_i2c_read_word_data">
|
||||||
|
<value name="reg">
|
||||||
|
<shadow type="math_number">
|
||||||
|
<field name="NUM">0</field>
|
||||||
|
</shadow>
|
||||||
|
</value>
|
||||||
|
</block>
|
||||||
<block type="ugj_i2c_write_i2c_block_data">
|
<block type="ugj_i2c_write_i2c_block_data">
|
||||||
<value name="reg">
|
<value name="reg">
|
||||||
<shadow type="math_number">
|
<shadow type="math_number">
|
||||||
|
9513
package-lock.json
generated
9513
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
120
package.json
120
package.json
@ -1,39 +1,81 @@
|
|||||||
{
|
{
|
||||||
"name": "ocoge",
|
"name": "ocoge",
|
||||||
"version": "0.1.3",
|
"version": "0.1.3",
|
||||||
"description": "\"大岩産 Code Generator\" は、Google Blockly ライブラリを使用した、Raspberry Pi 上で動作するブロックプログラム開発・実行環境です。",
|
"description": "ブロックベースビジュアルプログラム開発・実行環境",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm install --legacy-peer-deps",
|
"build": "npm install --legacy-peer-deps",
|
||||||
"start": "electron .",
|
"start": "electron-forge start",
|
||||||
"rebuild": "electron-rebuild"
|
"rebuild": "electron-rebuild",
|
||||||
},
|
"package": "electron-forge package",
|
||||||
"repository": {
|
"make": "electron-forge make",
|
||||||
"type": "git",
|
"launch": "electron ."
|
||||||
"url": "git+https://github.com/ocogeclub/ocoge.git"
|
},
|
||||||
},
|
"repository": {
|
||||||
"keywords": [],
|
"type": "git",
|
||||||
"author": "",
|
"url": "git+https://github.com/ocogeclub/ocoge.git"
|
||||||
"license": "ISC",
|
},
|
||||||
"bugs": {
|
"keywords": [],
|
||||||
"url": "https://github.com/ocogeclub/ocoge/issues"
|
"author": "",
|
||||||
},
|
"license": "ISC",
|
||||||
"homepage": "https://github.com/ocogeclub/ocoge#readme",
|
"bugs": {
|
||||||
"devDependencies": {
|
"url": "https://github.com/ocogeclub/ocoge/issues"
|
||||||
"electron": "^16.0.2",
|
},
|
||||||
"electron-rebuild": "^3.2.5"
|
"homepage": "https://github.com/ocogeclub/ocoge#readme",
|
||||||
},
|
"devDependencies": {
|
||||||
"dependencies": {
|
"@electron-forge/cli": "^6.0.0-beta.61",
|
||||||
"@ocogeclub/amg8833": "file:local_modules/@ocogeclub/amg8833",
|
"@electron-forge/maker-deb": "^6.0.0-beta.61",
|
||||||
"@ocogeclub/bme280": "file:local_modules/@ocogeclub/bme280",
|
"@electron-forge/maker-rpm": "^6.0.0-beta.61",
|
||||||
"@ocogeclub/paj7620": "file:local_modules/@ocogeclub/paj7620",
|
"@electron-forge/maker-squirrel": "6.0.0-beta.33",
|
||||||
"@ocogeclub/pigpio": "file:local_modules/@ocogeclub/pigpio",
|
"@electron-forge/maker-zip": "^6.0.0-beta.61",
|
||||||
"@tensorflow-models/knn-classifier": "^1.2.2",
|
"electron": "^16.0.5",
|
||||||
"@tensorflow-models/mobilenet": "^2.1.0",
|
"electron-rebuild": "^3.2.5"
|
||||||
"@tensorflow/tfjs-node": "^3.11.0",
|
},
|
||||||
"@vladmandic/face-api": "^1.5.7",
|
"dependencies": {
|
||||||
"axios": "^0.24.0",
|
"@ocogeclub/amg8833": "file:local_modules/@ocogeclub/amg8833",
|
||||||
"nodemailer": "^6.7.2",
|
"@ocogeclub/bme280": "file:local_modules/@ocogeclub/bme280",
|
||||||
"tensorset": "^1.2.9"
|
"@ocogeclub/paj7620": "file:local_modules/@ocogeclub/paj7620",
|
||||||
}
|
"@ocogeclub/pigpio": "file:local_modules/@ocogeclub/pigpio",
|
||||||
}
|
"@tensorflow-models/knn-classifier": "^1.2.2",
|
||||||
|
"@tensorflow-models/mobilenet": "^2.1.0",
|
||||||
|
"@tensorflow/tfjs-converter": "^3.12.0",
|
||||||
|
"@tensorflow/tfjs-core": "^3.12.0",
|
||||||
|
"@tensorflow/tfjs-node": "^3.12.0",
|
||||||
|
"@vladmandic/face-api": "^1.6.1",
|
||||||
|
"axios": "^0.24.0",
|
||||||
|
"electron-squirrel-startup": "^1.0.0",
|
||||||
|
"nodemailer": "^6.7.2",
|
||||||
|
"tensorset": "^1.2.9"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"forge": {
|
||||||
|
"packagerConfig": {},
|
||||||
|
"makers": [
|
||||||
|
{
|
||||||
|
"name": "@electron-forge/maker-squirrel",
|
||||||
|
"config": {
|
||||||
|
"name": "ocoge"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "@electron-forge/maker-zip",
|
||||||
|
"platforms": [
|
||||||
|
"darwin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "@electron-forge/maker-deb",
|
||||||
|
"config": {
|
||||||
|
"options": {
|
||||||
|
"categories": [
|
||||||
|
"Development"
|
||||||
|
],
|
||||||
|
"icon": "./icon.png",
|
||||||
|
"maintainer": "ICHIJU-INN <pi@ichiju.in>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -927,7 +927,7 @@ Blockly.Blocks['ugj_i2c_read_byte_data'] = {
|
|||||||
};
|
};
|
||||||
Blockly.JavaScript['ugj_i2c_read_byte_data'] = function (block) {
|
Blockly.JavaScript['ugj_i2c_read_byte_data'] = function (block) {
|
||||||
var value_reg = Blockly.JavaScript.valueToCode(block, 'reg', Blockly.JavaScript.ORDER_ATOMIC);
|
var value_reg = Blockly.JavaScript.valueToCode(block, 'reg', Blockly.JavaScript.ORDER_ATOMIC);
|
||||||
var code = `await _pi.i2c_read_byte_data(${value_reg})\n`;
|
var code = `await _pi.i2c_read_byte_data(${value_reg})`;
|
||||||
return [code, Blockly.JavaScript.ORDER_ATOMIC];
|
return [code, Blockly.JavaScript.ORDER_ATOMIC];
|
||||||
};
|
};
|
||||||
Blockly.Python['ugj_i2c_read_byte_data'] = function (block) {
|
Blockly.Python['ugj_i2c_read_byte_data'] = function (block) {
|
||||||
@ -936,6 +936,26 @@ Blockly.Python['ugj_i2c_read_byte_data'] = function (block) {
|
|||||||
return [code, Blockly.Python.ORDER_ATOMIC];
|
return [code, Blockly.Python.ORDER_ATOMIC];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Blockly.Blocks['ugj_i2c_read_word_data'] = {
|
||||||
|
init: function () {
|
||||||
|
this.appendValueInput("reg")
|
||||||
|
.setCheck("Number")
|
||||||
|
.appendField("レジスタ");
|
||||||
|
this.appendDummyInput()
|
||||||
|
.appendField("のワード値");
|
||||||
|
this.setInputsInline(true);
|
||||||
|
this.setOutput(true, "Number");
|
||||||
|
this.setStyle('gpio_blocks');
|
||||||
|
this.setTooltip("デバイスの指定レジスタからワードデータを読み出します。");
|
||||||
|
this.setHelpUrl("");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Blockly.JavaScript['ugj_i2c_read_word_data'] = function (block) {
|
||||||
|
var value_reg = Blockly.JavaScript.valueToCode(block, 'reg', Blockly.JavaScript.ORDER_ATOMIC);
|
||||||
|
var code = `await _pi.i2c_read_word_data(${value_reg})`;
|
||||||
|
return [code, Blockly.JavaScript.ORDER_ATOMIC];
|
||||||
|
};
|
||||||
|
|
||||||
var ugjI2cWriteI2cBlockDataDefinition = {
|
var ugjI2cWriteI2cBlockDataDefinition = {
|
||||||
"type": "ugj_i2c_write_i2c_block_data",
|
"type": "ugj_i2c_write_i2c_block_data",
|
||||||
"message0": "%{BKY_I2C_WRITE_I2C_BLOCK_DATA_TITLE}",
|
"message0": "%{BKY_I2C_WRITE_I2C_BLOCK_DATA_TITLE}",
|
||||||
@ -2113,7 +2133,7 @@ Blockly.Blocks['ugj_event_key'] = {
|
|||||||
this.setInputsInline(true);
|
this.setInputsInline(true);
|
||||||
this.setPreviousStatement(true, null);
|
this.setPreviousStatement(true, null);
|
||||||
this.setNextStatement(true, null);
|
this.setNextStatement(true, null);
|
||||||
this.setStyle('multimedia_blocks')
|
this.setStyle('multimedia_blocks');
|
||||||
this.setTooltip("キーボードを押したり離したりした時のアクションです。");
|
this.setTooltip("キーボードを押したり離したりした時のアクションです。");
|
||||||
this.setHelpUrl("https://developer.mozilla.org/ja/docs/Web/API/KeyboardEvent/key/Key_Values");
|
this.setHelpUrl("https://developer.mozilla.org/ja/docs/Web/API/KeyboardEvent/key/Key_Values");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user