Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/hw/robolink_ZumiMini.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hw_lite/robolink_ZumiMini_lite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/class/AILearning.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import blockAiLearningDecisiontree from '../playground/blocks/block_ai_learning_
import blockAiLearningSvm from '../playground/blocks/block_ai_learning_svm';
import blockAiUtilizeMediaPipe from '../playground/blocks/block_ai_utilize_media_pipe';
import InputPopup from './learning/InputPopup';
import _isEmpty from 'lodash/isEmpty';

Entry.MlPopup = InputPopup;
const basicBlockList = [
Expand Down Expand Up @@ -243,6 +244,9 @@ export default class AILearning {
if (!this.#dataApi) {
console.log('there is no dataApi');
return;
} else if (_isEmpty(modelInfo)) {
console.log('empty modelInfo');
return;
}
this.destroy();

Expand Down
31 changes: 7 additions & 24 deletions src/playground/blocks/block_expansion_weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Entry.EXPANSION_BLOCK.weather = {
return;
}
Entry.EXPANSION_BLOCK.weather.date = new Date();
Entry.EXPANSION_BLOCK.weather.localDate = new Date().toLocaleDateString().replaceAll('.', '').replaceAll(' ', '')
Entry.EXPANSION_BLOCK.weather.getData('week', 'Seoul', 'today');
Entry.EXPANSION_BLOCK.weather.getData('hour', 'Seoul', '00');
Entry.EXPANSION_BLOCK.weather.getData('now', 'Seoul');
Expand Down Expand Up @@ -169,10 +170,7 @@ Entry.EXPANSION_BLOCK.weather = {
default:
break;
}
return date
.toISOString()
.slice(0, 10)
.replace(/-/g, '');
return date.toLocaleDateString().replaceAll('.', '').replaceAll(' ', '');
},
locationMap: {
Seoul: {
Expand Down Expand Up @@ -1205,10 +1203,7 @@ Entry.EXPANSION_BLOCK.weather.getBlocks = function() {
parent: script.getField('LOCATION', script),
sub: script.getField('SUBLOCATION', script),
};
const date = Entry.EXPANSION_BLOCK.weather.date
.toISOString()
.slice(0, 10)
.replace(/-/g, '');
const date = Entry.EXPANSION_BLOCK.weather.localDate;
let time = script.getField('TIME', script);
// db에 저장하지 않으면서 00시가 없어져서 03시부터 가능..
if (time == '00') {
Expand Down Expand Up @@ -1589,10 +1584,7 @@ Entry.EXPANSION_BLOCK.weather.getBlocks = function() {
class: 'weather_legacy',
isNotFor: ['weather_legacy'],
async func(sprite, script) {
const date = Entry.EXPANSION_BLOCK.weather.date
.toISOString()
.slice(0, 10)
.replace(/-/g, '');
const date = Entry.EXPANSION_BLOCK.weather.localDate;
let time = script.getField('TIME', script);
// db에 저장하지 않으면서 00시가 없어져서 03시부터 가능..
if (time == '00') {
Expand Down Expand Up @@ -2050,10 +2042,7 @@ Entry.EXPANSION_BLOCK.weather.getBlocks = function() {
isNotFor: ['weather'],
async func(sprite, script) {
const location = script.getValue('LOCATION', script);
const date = Entry.EXPANSION_BLOCK.weather.date
.toISOString()
.slice(0, 10)
.replace(/-/g, '');
const date = Entry.EXPANSION_BLOCK.weather.localDate;
let time = script.getField('TIME', script);
// db에 저장하지 않으면서 00시가 없어져서 03시부터 가능..
if (time == '00') {
Expand Down Expand Up @@ -2112,10 +2101,7 @@ Entry.EXPANSION_BLOCK.weather.getBlocks = function() {
const location = script.getValue('LOCATION', script);
const type =
Entry.EXPANSION_BLOCK.weather.propertyHourMap[script.getField('TYPE', script)];
const date = Entry.EXPANSION_BLOCK.weather.date
.toISOString()
.slice(0, 10)
.replace(/-/g, '');
const date = Entry.EXPANSION_BLOCK.weather.localDate;
let time = script.getField('TIME', script);
// db에 저장하지 않으면서 00시가 없어져서 03시부터 가능..
if (time == '00') {
Expand Down Expand Up @@ -2172,10 +2158,7 @@ Entry.EXPANSION_BLOCK.weather.getBlocks = function() {
isNotFor: ['weather'],
async func(sprite, script) {
const location = script.getValue('LOCATION', script);
const date = Entry.EXPANSION_BLOCK.weather.date
.toISOString()
.slice(0, 10)
.replace(/-/g, '');
const date = Entry.EXPANSION_BLOCK.weather.localDate;
let time = script.getField('TIME', script);
// db에 저장하지 않으면서 00시가 없어져서 03시부터 가능..
if (time == '00') {
Expand Down
10 changes: 5 additions & 5 deletions src/playground/blocks/hardware/block_ITPLE_board.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Entry.ITPLE.getBlocks = function () {
type: 'ITPLE_is_key_pressed',
},
paramsKeyMap: {
KEY: 1,
KEY: 0,
},
"class": 'ITPLEGet',
isNotFor: ['ITPLE'],
Expand All @@ -357,8 +357,8 @@ Entry.ITPLE.getBlocks = function () {
'8': { type: 'DIGITAL', index: 8 },
};

const seletedKey = script.getField('KEY');
const portConfig = keyToPortMap[seletedKey];
const selectedKey = script.getField('KEY');
const portConfig = keyToPortMap[selectedKey];

// 유효하지 않은 키는 즉시 false를 반환합니다.
if (!portConfig) {
Expand All @@ -376,7 +376,7 @@ Entry.ITPLE.getBlocks = function () {
js: [],
py: [
{
syntax: 'Arduino.digitalRead(%1)==0',
syntax: 'Arduino.digitalRead("%1")==0',
},
],
},
Expand Down Expand Up @@ -1229,4 +1229,4 @@ Entry.ITPLE.getBlocks = function () {
};
//endregion ITPLE 아두이노 확장모드

module.exports = Entry.ITPLE;
module.exports = Entry.ITPLE;
Loading
Loading