[update] ヘルパーアプリの場所を変更

This commit is contained in:
ocogeclub 2021-12-22 22:44:18 +09:00
parent 62a699ae83
commit 0d290f4cfe
2 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,7 @@ const ugj_const = {
mascot_path: './img/',
mascot_defname: 'tamachee.png',
library_path: './lib/',
executable_path: './bin/',
// executable_path: './bin/',
localStorage_fname: 'ocoge.json',
error_ja_all: 'エラーが発生しました。\n『おこげ倶楽部』までお問い合わせください。',
pig: 'pigpio',
@ -32,6 +32,7 @@ class elUtil {
this.gpio_backend = ugj_const.pig;
this.i2c_bus = ugj_const.i2c_defbus;
this.doc_current = process.env["HOME"] + '/Documents';
this.executable_path = process.env["HOME"] + '/.local/lib/ocogeclub/'
}
// 0で数値の桁合わせ : NUM=値 LEN=桁数
zeroPadding(NUM, LEN) {

View File

@ -2889,7 +2889,7 @@ Blockly.Blocks['aquestalk_pi'] = {
};
Blockly.JavaScript['aquestalk_pi'] = function (block) {
var value_talk = Blockly.JavaScript.valueToCode(block, 'talk', Blockly.JavaScript.ORDER_ATOMIC);
var code = `'${ugj_const.executable_path}aquestalkpi/AquesTalkPi -g 50 ' + ${value_talk} + ' | aplay', { shell: true }`;
var code = `'${elutil.executable_path}aquestalkpi/AquesTalkPi -g 50 ' + ${value_talk} + ' | aplay', { shell: true }`;
return [code, Blockly.JavaScript.ORDER_NONE];
};
@ -2929,7 +2929,7 @@ Blockly.Blocks['ugj_child_julius'] = {
}
};
Blockly.JavaScript['ugj_child_julius'] = function (block) {
var code = `'${ugj_const.executable_path}julius/julius-simple', ['-C', '${ugj_const.executable_path}julius/dictation-kit/am-gmm.jconf', '-gram', '${ugj_const.executable_path}julius/dic/assistant', '-nostrip']`;
var code = `'${elutil.executable_path}julius/julius-simple', ['-C', '${elutil.executable_path}julius/dictation-kit/am-gmm.jconf', '-gram', '${elutil.executable_path}julius/dic/assistant', '-nostrip']`;
return [code, Blockly.JavaScript.ORDER_NONE];
};
// irrp.py - pigpioによる赤外線リモコンの学習
@ -2997,7 +2997,7 @@ Blockly.Blocks['ugj_child_irrcvr'] = {
Blockly.JavaScript['ugj_child_irrcvr'] = function (block) {
var value_gpio = Blockly.JavaScript.valueToCode(block, 'gpio', Blockly.JavaScript.ORDER_ATOMIC);
// var code = `'python3', ['./scripts/irrcvr.py', '-g', '${value_gpio}']`;
var code = `'${ugj_const.executable_path}ir_hash/ir_hash', ['${value_gpio}']`;
var code = `'${elutil.executable_path}ir_hash/ir_hash', ['${value_gpio}']`;
return [code, Blockly.JavaScript.ORDER_NONE];
};