Skip to content

Commit

Permalink
更新 maqueen.ts, _locales/zh-cn/maqueen-strings.json, _locales/zh-tw/ma…
Browse files Browse the repository at this point in the history
…queen-strings.json, _locales/pt/maqueen-strings.json, _locales/fr/maqueen-strings.json, _locales/es/maqueen-strings.json, _locales/nb/maqueen-strings.json, _locales/ru/maqueen-strings.json, _locales/ja/maqueen-strings.json, _locales/zh-cn/maqueen-jsdoc-strings.json
  • Loading branch information
LinDong88 committed Nov 28, 2024
1 parent 2e9e46c commit 94b27ce
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 3 deletions.
2 changes: 2 additions & 0 deletions _locales/es/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
"Maqueen_V5.DirectionType.Right|block": "Derecha",
"Maqueen_V5.DirectionType.Left|block": "Izquierda",
"Maqueen_V5.DirectionType.All|block": "Todos",
"Maqueen_V5.DirectionType2.Right|block": "Derecha",
"Maqueen_V5.DirectionType2.Left|block": "Izquierda",
"Maqueen_V5.Motors.M1|block": "Izquierda",
"Maqueen_V5.Motors.M2|block": "Derecha",
"Maqueen_V5.Motors.All|block": "Todos",
Expand Down
2 changes: 2 additions & 0 deletions _locales/fr/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"Maqueen_V5.DirectionType.Right|block": "Droite",
"Maqueen_V5.DirectionType.Left|block": "Gauche",
"Maqueen_V5.DirectionType.All|block": "Tout",
"Maqueen_V5.DirectionType2.Right|block": "Droite",
"Maqueen_V5.DirectionType2.Left|block": "Gauche",
"Maqueen_V5.Motors.M1|block": "Côté gauche",
"Maqueen_V5.Motors.M2|block": "Côté droit",
"Maqueen_V5.Motors.All|block": "Tout",
Expand Down
2 changes: 2 additions & 0 deletions _locales/ja/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
"Maqueen_V5.DirectionType.Right|block": "",
"Maqueen_V5.DirectionType.Left|block": "",
"Maqueen_V5.DirectionType.All|block": "全て",
"Maqueen_V5.DirectionType2.Right|block": "",
"Maqueen_V5.DirectionType2.Left|block": "",
"Maqueen_V5.Motors.M1|block": "左側",
"Maqueen_V5.Motors.M2|block": "右側",
"Maqueen_V5.Motors.All|block": "全て",
Expand Down
4 changes: 3 additions & 1 deletion _locales/nb/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
"Maqueen_V5.bottomLedOff|block": "Slå av alle RGB bunner",
"Maqueen_V5.DirectionType.Right|block": "Høyre",
"Maqueen_V5.DirectionType.Left|block": "Venstre",
"Maqueen_V5.DirectionType.All|block": "Alle",
"Maqueen_V5.DirectionType.All|block": "Alle",
"Maqueen_V5.DirectionType2.Right|block": "Høyre",
"Maqueen_V5.DirectionType2.Left|block": "Venstre",
"Maqueen_V5.Motors.M1|block": "Venstre",
"Maqueen_V5.Motors.M2|block": "Høyre",
"Maqueen_V5.Motors.All|block": "Alle",
Expand Down
2 changes: 2 additions & 0 deletions _locales/pt/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"Maqueen_V5.DirectionType.Right|block": "Direita",
"Maqueen_V5.DirectionType.Left|block": "Esquerda",
"Maqueen_V5.DirectionType.All|block": "Todas",
"Maqueen_V5.DirectionType2.Right|block": "Direita",
"Maqueen_V5.DirectionType2.Left|block": "Esquerda",
"Maqueen_V5.Motors.M1|block": "Esquerdo",
"Maqueen_V5.Motors.M2|block": "Direito",
"Maqueen_V5.Motors.All|block": "Todos",
Expand Down
2 changes: 2 additions & 0 deletions _locales/ru/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
"Maqueen_V5.DirectionType.Right|block": "Право",
"Maqueen_V5.DirectionType.Left|block": "Лево",
"Maqueen_V5.DirectionType.All|block": "Все",
"Maqueen_V5.DirectionType2.Right|block": "Право",
"Maqueen_V5.DirectionType2.Left|block": "Лево",
"Maqueen_V5.Motors.M1|block": "Левый",
"Maqueen_V5.Motors.M2|block": "Правый",
"Maqueen_V5.Motors.All|block": "Все",
Expand Down
2 changes: 2 additions & 0 deletions _locales/zh-cn/maqueen-jsdoc-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"Maqueen_V5.DirectionType.Right": "",
"Maqueen_V5.DirectionType.Left": "",
"Maqueen_V5.DirectionType.All": "全部",
"Maqueen_V5.DirectionType2.Right": "",
"Maqueen_V5.DirectionType2.Left": "",
"Maqueen_V5.Motors.M1": "左侧",
"Maqueen_V5.Motors.M2": "右侧",
"Maqueen_V5.Motors.All": "全部",
Expand Down
2 changes: 2 additions & 0 deletions _locales/zh-cn/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
"Maqueen_V5.DirectionType.Right|block": "",
"Maqueen_V5.DirectionType.Left|block": "",
"Maqueen_V5.DirectionType.All|block": "全部",
"Maqueen_V5.DirectionType2.Right|block": "",
"Maqueen_V5.DirectionType2.Left|block": "",
"Maqueen_V5.Motors.M1|block": "左侧",
"Maqueen_V5.Motors.M2|block": "右侧",
"Maqueen_V5.Motors.All|block": "全部",
Expand Down
2 changes: 2 additions & 0 deletions _locales/zh-tw/maqueen-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
"Maqueen_V5.DirectionType.Right|block": "",
"Maqueen_V5.DirectionType.Left|block": "",
"Maqueen_V5.DirectionType.All|block": "全部",
"Maqueen_V5.DirectionType2.Right|block": "",
"Maqueen_V5.DirectionType2.Left|block": "",
"Maqueen_V5.Motors.M1|block": "左側",
"Maqueen_V5.Motors.M2|block": "右側",
"Maqueen_V5.Motors.All|block": "全部",
Expand Down
10 changes: 8 additions & 2 deletions maqueen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ namespace Maqueen_V5 {
All = 2,
}

export enum DirectionType2 {
//% block="left led light"
Left = 0,
//% block="right led light"
Right = 1,
}
export enum BatteryType {
//% block="Alkaline battery"
Alkaline = 1,
Expand Down Expand Up @@ -996,9 +1002,9 @@ namespace Maqueen_V5 {
//% block="Read Light Values %type"
//% weight=16
//% group="Maqueen_v5"
export function readLightIntensity(type: DirectionType): number {
export function readLightIntensity(type: DirectionType2): number {
let allBuffer = pins.createBuffer(2);
if (type == DirectionType.Left){
if (type == DirectionType2.Left){
pins.i2cWriteNumber(I2CADDR, LIGHTL_H, NumberFormat.Int8LE);
allBuffer = pins.i2cReadBuffer(I2CADDR, 2);
return allBuffer[0] << 8 | allBuffer[1];
Expand Down

0 comments on commit 94b27ce

Please sign in to comment.