Permalink
Browse files

Added system blocks category

* Added "CPU model" block
* Added "CPU temperature" block
* Added "CPU speed" block
* Added "free memory" block
  • Loading branch information...
jolivepetrus committed Jun 20, 2018
1 parent eb8ef16 commit de047008d780e1c2707ba5f79d99de356fbcf898
Binary file not shown.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1113,6 +1113,9 @@ Code.buildToolBox = function(callback) {
xml += '</category>';
}
xml += '<category id="catSystem" colour="'+Blockly.Blocks.actuators.HUE+'">';
xml += '</category>';
Code.lib.get(xml, function(xml) {
var toolbox = document.getElementById('toolbox');
toolbox.innerHTML = xml;
@@ -1394,6 +1397,8 @@ Code.initLanguage = function() {
if (Code.status.modules.i2c) categories.push('catI2C');
if (Code.status.modules.can) categories.push('catCan');
if (Code.status.modules.lora) categories.push('catLora');
if (Code.status.modules.lora) categories.push('catSystem');
//if (Code.status.modules.lora) categories.push('catLoraOTAA');
//if (Code.status.modules.lora) categories.push('catLoraABP');
View
Binary file not shown.
@@ -0,0 +1,107 @@
{
"name": "system-cpu",
"blocks": [
{
"parentCategory": "System",
"category": "CPU",
"xmlSpec": "PHhtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+PGJsb2NrIHR5cGU9ImZhY3RvcnlfYmFzZSIgaWQ9Il5uYTBmSFZDczRsM2cvcC51Lz0uIiBkZWxldGFibGU9ImZhbHNlIiBtb3ZhYmxlPSJmYWxzZSIgeD0iMTAiIHk9IjE1Ij48bXV0YXRpb24gY29ubmVjdGlvbnM9IkxFRlQiPjwvbXV0YXRpb24+PGZpZWxkIG5hbWU9IklOTElORSI+QVVUTzwvZmllbGQ+PGZpZWxkIG5hbWU9IkNPTk5FQ1RJT05TIj5MRUZUPC9maWVsZD48c3RhdGVtZW50IG5hbWU9IklOUFVUUyI+PGJsb2NrIHR5cGU9ImlucHV0X2R1bW15IiBpZD0iITpSNDVic2pLTl0yKV00UzZ2SywiPjx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model",
"output": null,
"colour": 230,
"tooltip": "",
"helpUrl": ""
},
"msg": {
"en": {
"message0": "CPU model"
},
"ca": {
"message0": "model CPU"
},
"es": {
"message0": "modelo CPU"
}
},
"whatcher": false,
"dependency": [
"block"
],
"shadow": {},
"subtype": {},
"code": {
"default": "",
"functions": ""
}
},
{
"parentCategory": "System",
"category": "CPU",
"xmlSpec": "PHhtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+PGJsb2NrIHR5cGU9ImZhY3RvcnlfYmFzZSIgaWQ9InBzdi90fnNqRH05dVpNWUZjJHI0IiBkZWxldGFibGU9ImZhbHNlIiBtb3ZhYmxlPSJmYWxzZSIgeD0iMTAiIHk9IjE1Ij48bXV0YXRpb24gY29ubmVjdGlvbnM9IkxFRlQiPjwvbXV0YXRpb24+PGZpZWxkIG5hbWU9IklOTElORSI+QVVUTzwvZmllbGQ+PGZpZWxkIG5hbWU9IkNPTk5FQ1RJT05TIj5MRUZUPC9maWVsZD48c3RhdGVtZW50IG5hbWU9IklOUFVUUyI+PGJsb2NrIHR5cGU9ImlucHV0X2R1bW15IiBpZD0idGVROiFTSmtOW2dFc1k0V3IwfUsiPjxmaWVsZCBuYW1lPSJBTElHTiI+TEVGVDwvZmllbGQ+PGZpZWxkIG5hbWU9IlNVQlRZUEUiPmZyZWU8L2ZpZWxkPjxzdGF0ZW1lbnQgbmFtZT0iRklFTERTIj48YmxvY2sgdHlwZT0iZmllbGRfc3RhdGljIiBpZD0ifXdvcHVeRnNabHtSLn5hdWNYbjQiPjxmaWVsZCBuYW1lPSJURVhUIj5DUFUgdGVtcGVydHVyZTwvZmllbGQ+PC9ibG9jaz48L3N0YXRlbWVudD48L2Jsb2NrPjwvc3RhdGVtZW50Pjx2YWx1ZSBuYW1lPSJUT09MVElQIj48YmxvY2sgdHlwZT0idGV4dCIgaWQ9Ijk7QHReVihkL3V2ZVA5QHViN1tFIiBkZWxldGFibGU9ImZhbHNlIiBtb3ZhYmxlPSJmYWxzZSI+PGZpZWxkIG5hbWU9IlRFWFQiPjwvZmllbGQ+PC9ibG9jaz48L3ZhbHVlPjx2YWx1ZSBuYW1lPSJIRUxQVVJMIj48YmxvY2sgdHlwZT0idGV4dCIgaWQ9IiMsd2t9JFlDX0wuYTovWFFyJF4vIiBkZWxldGFibGU9ImZhbHNlIiBtb3ZhYmxlPSJmYWxzZSI+PGZpZWxkIG5hbWU9IlRFWFQiPjwvZmllbGQ+PC9ibG9jaz48L3ZhbHVlPjx2YWx1ZSBuYW1lPSJPVVRQVVRUWVBFIj48c2hhZG93IHR5cGU9InR5cGVfbnVsbCIgaWQ9IjhKKVYwcEVqTHk3JWx8Qnk2Wm1bIj48L3NoYWRvdz48L3ZhbHVlPjx2YWx1ZSBuYW1lPSJDT0xPVVIiPjxibG9jayB0eXBlPSJjb2xvdXJfaHVlIiBpZD0iTGN9Qik7ZFphJSs4RzdLZn0kWWsiPjxtdXRhdGlvbiBjb2xvdXI9IiM1YjY3YTUiPjwvbXV0YXRpb24+PGZpZWxkIG5hbWU9IkhVRSI+MjMwPC9maWVsZD48L2Jsb2NrPjwvdmFsdWU+PC9ibG9jaz48L3htbD4=",
"spec": {
"type": "cpu_temperature",
"message0": "temperatura CPU",
"output": null,
"colour": 230,
"tooltip": "",
"helpUrl": ""
},
"msg": {
"en": {
"message0": "CPU temperture"
},
"ca": {
"message0": "temperatura CPU"
},
"es": {
"message0": "temperatura CPU"
}
},
"whatcher": false,
"dependency": [
"block"
],
"shadow": {},
"subtype": {},
"code": {
"default": "Y3B1LnRlbXBlcmF0dXJlKCk=",
"functions": ""
}
},
{
"parentCategory": "System",
"category": "CPU",
"xmlSpec": "PHhtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+PGJsb2NrIHR5cGU9ImZhY3RvcnlfYmFzZSIgaWQ9InREYU1bS3FdLlJie1pkWGFbKk55IiBkZWxldGFibGU9ImZhbHNlIiBtb3ZhYmxlPSJmYWxzZSIg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PC92YWx1ZT48dmFsdWUgbmFtZT0iQ09MT1VSIj48YmxvY2sgdHlwZT0iY29sb3VyX2h1ZSIgaWQ9IjUzYXVBZSpyTW41dE5pc34ubEV1Ij48bXV0YXRpb24gY29sb3VyPSIjNWI2N2E1Ij48L211dGF0aW9uPjxmaWVsZCBuYW1lPSJIVUUiPjIzMDwvZmllbGQ+PC9ibG9jaz48L3ZhbHVlPjwvYmxvY2s+PC94bWw+",
"spec": {
"type": "cpu_speed",
"message0": "velocitat CPU",
"output": null,
"colour": 230,
"tooltip": "",
"helpUrl": ""
},
"msg": {
"en": {
"message0": "CPU speed"
},
"ca": {
"message0": "velocitat CPU"
},
"es": {
"message0": "velocidad CPU"
}
},
"whatcher": false,
"dependency": [
"block"
],
"shadow": {},
"subtype": {},
"code": {
"default": "Y3B1LnNwZWVkKCk=",
"functions": ""
}
}
]
}
@@ -0,0 +1,47 @@
{
"name": "system-memory",
"messages": [
{
"msgid": "catMemory",
"en": "Memory",
"ca": "Memòria",
"es": "Memoria"
}
],
"blocks": [
{
"parentCategory": "System",
"category": "Memory",
"xmlSpec": "PHhtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+PGJsb2NrIHR5cGU9ImZhY3RvcnlfYmFzZSIgaWQ9Iih+NW44XlRGRyE7X189dnU6NXF3IiBkZWxldGFibGU9ImZhbHNlIiBtb3ZhYmxlPSJmYWxzZSIgeD0iMTAiIHk9IjE1Ij48bXV0YXRpb24gY29ubmVjdGlvbnM9IkxFRlQiPjwvbXV0YXRpb24+PGZpZWxkIG5hbWU9IklOTElORSI+QVVUTzwvZmllbGQ+PGZpZWxkIG5hbWU9IkNPTk5FQ1RJT05TIj5MRUZUPC9maWVsZD48c3RhdGVtZW50IG5hbWU9IklOUFVUUyI+PGJsb2NrIHR5cGU9ImlucHV0X2R1bW15IiBpZD0iZ31odngwSm45MEttV04tZHo6VGgiPjxmaWVsZCBuYW1lPSJBTElHTiI+TEVGVDwvZmllbGQ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pUrl": ""
},
"msg": {
"en": {
"message0": "free memory"
},
"ca": {
"message0": "memòria lliure"
},
"es": {
"message0": "memoria libre"
}
},
"whatcher": false,
"dependency": [
"block"
],
"shadow": {},
"subtype": {},
"code": {
"default": "b3Muc3RhdHMoIm1lbSIp",
"functions": ""
}
}
]
}
Oops, something went wrong.

0 comments on commit de04700

Please sign in to comment.