text:
//www.technozone51fr

// define blocks
'use strict';

//btn1white OK
Blockly.Blocks['technozone_btn1white'] = {
  init: function() {
    this.setColour("#646464");
    this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
	this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT5)
        .appendField(new Blockly.FieldImage("blocks/technozone51/btn1white.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
		.appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT6)
    this.setInputsInline(true);
	this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT7);
  }
};

//btn1black OK
Blockly.Blocks['technozone_btn1black'] = {
  init: function() {
    this.setColour("#646464");
    this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
	this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT5)
        .appendField(new Blockly.FieldImage("blocks/technozone51/btn1black.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT6);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT7);
  }
};

//btn1green OK
Blockly.Blocks['technozone_btn1green'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT5)
        .appendField(new Blockly.FieldImage("blocks/technozone51/btn1green.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT6);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT9);
  }
};

//btn1red OK
Blockly.Blocks['technozone_btn1red'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT5)
        .appendField(new Blockly.FieldImage("blocks/technozone51/btn1red.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT6);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT10);
  }
};

//Switch1 OK
Blockly.Blocks['technozone_switch1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:switch1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT11)
        .appendField(new Blockly.FieldImage("blocks/technozone51/switch1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT6);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT12);
  }
};

//ils1 OK
Blockly.Blocks['technozone_ils1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:ils1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT1)
        .appendField(new Blockly.FieldImage("blocks/technozone51/ils1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT13);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT14);
  }
};

//proxi1 OK
Blockly.Blocks['technozone_proxi1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:proxi1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT15)
        .appendField(new Blockly.FieldImage("blocks/technozone51/proxi1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT16);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT17);
  }
};

//bari1 OK
Blockly.Blocks['technozone_bari1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:bari1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT18)
        .appendField(new Blockly.FieldImage("blocks/technozone51/bari1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT16);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT19);
  }
};

//Détecteur de ligne OK
Blockly.Blocks['technozone_lig1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lig1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT1)
        .appendField(new Blockly.FieldImage("blocks/technozone51/lig1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT3);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT4);
  }
};

//cmouv1 OK
Blockly.Blocks['technozone_cmouv1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:cmouv1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT1)
        .appendField(new Blockly.FieldImage("blocks/technozone51/servo1.jpg", 64, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/plus.jpg", 20, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/cmouv1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT20);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT21);
  }
};

//potar1 OK
Blockly.Blocks['technozone_potar1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:potar1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT22)
        .appendField(new Blockly.FieldImage("blocks/technozone51/potar1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setOutput(true, 'Number');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT23);
  }
};

//ctn1 OK
Blockly.Blocks['technozone_ctn1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:ctn1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT24)
        .appendField(new Blockly.FieldImage("blocks/technozone51/ctn1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setOutput(true, 'Number');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT25);
  }
};

//ldr1 OK
Blockly.Blocks['technozone_ldr1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:ldr1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT26)
        .appendField(new Blockly.FieldImage("blocks/technozone51/ldr1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setOutput(true, 'Number');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT27);
  }
};

//sonar1 OK
Blockly.Blocks['technozone_sonar1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:sonar1');
    this.appendDummyInput("")
	    .appendField(Blockly.Msg.TECHNOZONE51_TEXT28)
        .appendField(new Blockly.FieldImage("blocks/technozone51/sonar1.jpg", 64, 64))
    this.appendValueInput("TRIGER",'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
	    .appendField(Blockly.Msg.TECHNOZONE51_TEXT29)
    this.appendValueInput("DIST", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT30)
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT31);
  }
};

//led1red OK
Blockly.Blocks['technozone_led1red'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:led1');
    this.appendDummyInput("")
        .appendField(new Blockly.FieldDropdown([[Blockly.Msg.TECHNOZONE51_TEXT33, "HIGH"], [Blockly.Msg.TECHNOZONE51_TEXT34, "LOW"]]), "STAT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT32)
        .appendField(new Blockly.FieldImage("blocks/technozone51/led1red.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT35);
  }
};

//led1green OK
Blockly.Blocks['technozone_led1green'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:led1');
    this.appendDummyInput("")
        .appendField(new Blockly.FieldDropdown([[Blockly.Msg.TECHNOZONE51_TEXT33, "HIGH"], [Blockly.Msg.TECHNOZONE51_TEXT34, "LOW"]]), "STAT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT32)
        .appendField(new Blockly.FieldImage("blocks/technozone51/led1green.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT36);
  }
};

//led1yellow OK
Blockly.Blocks['technozone_led1yellow'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:led1');
    this.appendDummyInput("")
        .appendField(new Blockly.FieldDropdown([[Blockly.Msg.TECHNOZONE51_TEXT33, "HIGH"], [Blockly.Msg.TECHNOZONE51_TEXT34, "LOW"]]), "STAT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT32)
        .appendField(new Blockly.FieldImage("blocks/technozone51/led1yellow.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT37);
  }
};

Blockly.Blocks['technozone_relay1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:relay1');
    this.appendDummyInput("")
        .appendField(new Blockly.FieldDropdown([[Blockly.Msg.TECHNOZONE51_TEXT40, "LOW"], [Blockly.Msg.TECHNOZONE51_TEXT41, "HIGH"]]), "STAT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT38)
        .appendField(new Blockly.FieldImage("blocks/technozone51/relay1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT42);
  }
};

Blockly.Blocks['technozone_buzzer1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:buzzer1');
    this.appendDummyInput("")
		.appendField(Blockly.Msg.TECHNOZONE51_TEXT43)
        .appendField(new Blockly.FieldImage("blocks/technozone51/buzzer1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendValueInput("NUM",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT44)
        .setCheck(Number);
    this.appendValueInput("TPS",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT45)
        .setCheck(Number);
    this.setInputsInline(false);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT46);
  }
};

//mot1easycon1 OK
Blockly.Blocks['technozone_mot1easycon1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:easybot1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT51)
        .appendField(new Blockly.FieldDropdown([["A", "HIGH"], ["B", "LOW"]]), "MOT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT52)
        .appendField(new Blockly.FieldImage("blocks/technozone51/easycon1.jpg", 64, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/plus.jpg", 20, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/kitmot1.jpg", 64, 64));
    this.appendValueInput("SENS", 'Boolean')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT53);
    this.appendValueInput("VITESSE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT54);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT55);
  }
};

//mot1easybot1 OK
Blockly.Blocks['technozone_mot1easybot1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:easybot1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT51)
        .appendField(new Blockly.FieldDropdown([["A", "HIGH"], ["B", "LOW"]]), "MOT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT56)
        .appendField(new Blockly.FieldImage("blocks/technozone51/easybot.jpg", 64, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/plus.jpg", 20, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/kitmot1.jpg", 64, 64));
    this.appendValueInput("SENS", 'Boolean')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT53);
    this.appendValueInput("VITESSE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT54);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT57);
  }
};

//mot2 OK
Blockly.Blocks['technozone_mot2'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:mot2');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT51)
        .appendField(new Blockly.FieldDropdown([["A", "HIGH"], ["B", "LOW"]]), "MOT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT58)
        .appendField(new Blockly.FieldImage("blocks/technozone51/mot2.jpg", 64, 64))
        //.appendField(Blockly.Msg.TECHNOZONE51_TEXT59);
    this.appendValueInput("PINDIR", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT60)
    this.appendValueInput("PINPWM", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT61)
    this.appendValueInput("SENS", 'Boolean')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT53);
    this.appendValueInput("VITESSE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT54);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT62);
  }
};

//pap1init OK
Blockly.Blocks['technozone_pap1init'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT63)
        .appendField(new Blockly.FieldImage("blocks/technozone51/pap1.jpg", 64, 64))
    this.appendDummyInput("")
		.appendField(Blockly.Msg.TECHNOZONE51_TEXT64)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT65)
        .appendField(new Blockly.FieldDropdown([["16", "16"], ["17", "17"], ["18", "18"], ["19", "19"], ["20", "20"], ["21", "21"], ["22", "22"], ["23", "23"]]), "I2CADD");
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT66)
        .appendField(new Blockly.FieldDropdown([["Single Stepping", "SINGLE_STEPPING"], ["Full Stepping", "FULL_STEPPING"], ["Half Stepping", "HALF_STEPPING"]]), "MODE");
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT67)
        .appendField(new Blockly.FieldDropdown([["Auto Relax", "AUTO_RELAX"], ["No Auto Relax", "NO_AUTO_RELAX"]]), "RELAX");
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT68);
  }
};

//pap1cc OK
Blockly.Blocks['technozone_pap1cc'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT69)
        .appendField(new Blockly.FieldDropdown([["A", "HIGH"], ["B", "LOW"]]), "MOT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT70)
        .appendField(new Blockly.FieldImage("blocks/technozone51/pap1.jpg", 64, 64))
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT64)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT65)
        .appendField(new Blockly.FieldDropdown([["16", "16"], ["17", "17"], ["18", "18"], ["19", "19"], ["20", "20"], ["21", "21"], ["22", "22"], ["23", "23"]]), "I2CADD");
    this.appendValueInput("SENS", 'Boolean')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT53);
    this.appendValueInput("VITESSE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT54);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT68);
  }
};

//pap1relatif OK
Blockly.Blocks['technozone_pap1relatif'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT71)
        .appendField(new Blockly.FieldDropdown([["A", "HIGH"], ["B", "LOW"]]), "MOT")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT70)
        .appendField(new Blockly.FieldImage("blocks/technozone51/pap1.jpg", 64, 64))
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT64)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT65)
        .appendField(new Blockly.FieldDropdown([["16", "16"], ["17", "17"], ["18", "18"], ["19", "19"], ["20", "20"], ["21", "21"], ["22", "22"], ["23", "23"]]), "I2CADD");
    this.appendValueInput("SENS", 'Boolean')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT53);
    this.appendValueInput("VITESSE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT54);
    this.appendValueInput("PAS",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT72);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT68);
  }
};

//pap1busy OK
Blockly.Blocks['technozone_pap1busy'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT73)
        .appendField(new Blockly.FieldImage("blocks/technozone51/pap1.jpg", 64, 64));
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT64)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT65)
        .appendField(new Blockly.FieldDropdown([["16", "16"], ["17", "17"], ["18", "18"], ["19", "19"], ["20", "20"], ["21", "21"], ["22", "22"], ["23", "23"]]), "I2CADD")
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT68);
  }
};

//servo1 OK
Blockly.Blocks['technozone_servo1'] = {
  init: function() {
    this.setColour("#646464")
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:servo1')
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT47)
        .appendField(new Blockly.FieldImage("blocks/technozone51/servo1.jpg", 64, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/plus.jpg", 20, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/servomoteur1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.appendValueInput("DEGREE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT48);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT49);
  }
};

//read_servo1 OK
Blockly.Blocks['technozone_read_servo1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:servo1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT50)
        .appendField(new Blockly.FieldImage("blocks/technozone51/servomoteur1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setOutput(true, 'Number');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT49);
  }
};

//lcdinit OK
Blockly.Blocks['technozone_lcdinit'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lcd1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT74)
        .appendField(new Blockly.FieldImage("blocks/technozone51/lcd1.jpg", 64, 64))
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
		.appendField(Blockly.Msg.TECHNOZONE51_TEXT75)
        .appendField(new Blockly.FieldDropdown([["39", "39"], ["63", "63"]]),"I2C_adress");
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT76)
        .appendField(new Blockly.FieldTextInput('16',Blockly.Blocks.math_number.validator), 'nbcol');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT77)
        .appendField(new Blockly.FieldTextInput('2',Blockly.Blocks.math_number.validator), 'nblig');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT78)
        .appendField(new Blockly.FieldCheckbox('TRUE'), 'backlight');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT79)
        .appendField(new Blockly.FieldCheckbox('FALSE'), 'cursor');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT80)
        .appendField(new Blockly.FieldCheckbox('FALSE'), 'blink');
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT81);
  }
};

//lcdspecial OK
Blockly.Blocks['technozone_lcdspecial'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lcd1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT82)
    this.appendDummyInput("")
        .appendField(new Blockly.FieldImage("blocks/technozone51/lcd1.jpg", 64, 64))
        .appendField(new Blockly.FieldDropdown([[Blockly.Msg.TECHNOZONE51_TEXT83, "backlight"], [Blockly.Msg.TECHNOZONE51_TEXT84, "noBacklight"],[Blockly.Msg.TECHNOZONE51_TEXT85, "cursor"],[Blockly.Msg.TECHNOZONE51_TEXT86, "noCursor"],[Blockly.Msg.TECHNOZONE51_TEXT87, "blink"],[Blockly.Msg.TECHNOZONE51_TEXT88, "noBlink"],[Blockly.Msg.TECHNOZONE51_TEXT89, "display"],[Blockly.Msg.TECHNOZONE51_TEXT90, "noDisplay"]]),"special");
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT91);
  }
};

//lcdclear OK
Blockly.Blocks['technozone_lcdclear'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lcd1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT92)
        .appendField(new Blockly.FieldImage("blocks/technozone51/lcd1.jpg", 64, 64));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT93);
  }
};

//lcdwrite OK
Blockly.Blocks['technozone_lcdwrite'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lcd1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT94)
        .appendField(new Blockly.FieldImage("blocks/technozone51/lcd1.jpg", 64, 64))
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT98);
    this.appendDummyInput("")
		.appendField(Blockly.Msg.TECHNOZONE51_TEXT95);
    this.appendValueInput("COL", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT96)
    this.appendValueInput("LIG", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT97)
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT99);
  }
};

//telecsetup OK
Blockly.Blocks['technozone_telecsetup'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:irf1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT100)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(new Blockly.FieldImage("blocks/technozone51/irf1.jpg", 64, 64))
    this.appendValueInput("PIN", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT2)
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT101);
  }
};

//telecflush OK
Blockly.Blocks['technozone_telecflush'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:irf1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT102)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(new Blockly.FieldImage("blocks/technozone51/irf1.jpg", 64, 64));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT103);
  }
};

//telecint OK
Blockly.Blocks['technozone_telecinit'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:irf1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT104)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(new Blockly.FieldImage("blocks/technozone51/irf1.jpg", 64, 64));
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT105);
  }
};

//telec2 OK
Blockly.Blocks['technozone_telec2'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:telec2');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT106)
        .appendField(new Blockly.FieldDropdown([["ON/OFF", "FFA25D"], ["MODE", "FF629D"], ["MUTE", "FFE21D"], ["PLAY/PAUSE", "FF22DD"], ["PREVIOUS", "FF02FD"], ["NEXT", "FFC23D"],
         ["EQ", "FFE1F"], ["VOL-", "FFA857"], ["VOL+", "FF906F"], ["0", "FF6897"], ["RPT", "FF9867"], ["U/SD", "FFB04F"], ["1", "FF30CF"], ["2", "FF18E7"],
          ["3", "FF7A85"], ["4", "FF10EF"], ["5", "FF38C7"], ["6", "FF5AA5"], ["7", "FF42BD"], ["8", "FF4AB5"], ["9", "FF52AD"]]), "TOUCHE")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT107)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(new Blockly.FieldImage("blocks/technozone51/irf1.jpg", 64, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/plus.jpg", 20, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/telec2.jpg", 64, 64))
        //.appendField(" sur la broche ")
        //.appendField(new Blockly.FieldDropdown(profile.default.digital), "PIN")
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT108);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT109);
  }
};

//telec1 OK
Blockly.Blocks['technozone_telec1'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:telec1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT106)
        .appendField(new Blockly.FieldDropdown([["ON/OFF", "FFA25D"], ["MODE", "FF629D"], ["MUTE", "FFE21D"], ["PREVIOUS", "FF22DD"], ["NEXT", "FF02FD"], ["PLAY/PAUSE", "FFC23D"],
         ["MINUS", "FFE1F"], ["PLUS", "FFA857"], ["EQ", "FF906F"], ["0", "FF6897"], ["100+", "FF9867"], ["RETURN", "FFB04F"], ["1", "FF30CF"], ["2", "FF18E7"],
          ["3", "FF7A85"], ["4", "FF10EF"], ["5", "FF38C7"], ["6", "FF5AA5"], ["7", "FF42BD"], ["8", "FF4AB5"], ["9", "FF52AD"]]), "TOUCHE")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT107)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(new Blockly.FieldImage("blocks/technozone51/irf1.jpg", 64, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/plus.jpg", 20, 64))
        .appendField(new Blockly.FieldImage("blocks/technozone51/telec1.jpg", 64, 64))
        //.appendField(" sur la broche ")
        //.appendField(new Blockly.FieldDropdown(profile.default.digital), "PIN")
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT108);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT110);
  }
};

//speech_init OK
Blockly.Blocks['technozone_speech_init'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=parole:faire_parler_vos_cartes_arduino');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT167);
    this.appendValueInput("SPEED", 'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT169);
    this.appendValueInput("PITCH",'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT170);
    this.appendValueInput("BENDING",'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT171);
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT168);
    this.setInputsInline(false);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT153);
  }
};

//speech_say
Blockly.Blocks['technozone_speech_say'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=parole:faire_parler_vos_cartes_arduino');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT167);
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT166);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT132);
  }
};

//bt_init OK
Blockly.Blocks['technozone_bt_init'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT157);
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(new Blockly.FieldImage("blocks/technozone51/bt1.jpg", 64, 64))
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
		.appendField(Blockly.Msg.TECHNOZONE51_TEXT165);
    this.appendValueInput("DIST", 'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("RX ");
    this.appendValueInput("TRIGER", 'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("TX ");
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT158);
  }
};

//robot_bt_available OK
Blockly.Blocks['technozone_robot_bt_available'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT159);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT160);
  }
};

//robot_bt_read OK
Blockly.Blocks['technozone_robot_bt_read'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT161);
    this.setOutput(true, 'String');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT162);
  }
};

//robot_bt_write
Blockly.Blocks['technozone_robot_bt_write'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT163);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT164);
  }
};

//ihm_init OK
Blockly.Blocks['technozone_ihm_init'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:bt1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT111)
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT112)
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
		.appendField(new Blockly.FieldImage("blocks/technozone51/bt1.jpg", 64, 64))
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
		.appendField(Blockly.Msg.TECHNOZONE51_TEXT165);
    this.appendValueInput("DIST", 'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("RX ");
    this.appendValueInput("TRIGER", 'Number')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("TX ");
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT113);
  }
};

//robot_ihm_available OK
Blockly.Blocks['technozone_robot_ihm_available'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT114);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT115);
  }
};

//robot_ihm_change OK
Blockly.Blocks['technozone_robot_ihm_change'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT116);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT117);
  }
};

//robot_ihm_led_def OK
Blockly.Blocks['technozone_robot_ihm_led_def'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT118)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT120);
    this.setInputsInline(false);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT121);
  }
};

//robot_ihm_led_on OK
Blockly.Blocks['technozone_robot_ihm_led_on'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT122)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT123)
        .appendField(new Blockly.FieldDropdown([[Blockly.Msg.TECHNOZONE51_TEXT124, "0"], [Blockly.Msg.TECHNOZONE51_TEXT125, "1"], [Blockly.Msg.TECHNOZONE51_TEXT126, "2"], [Blockly.Msg.TECHNOZONE51_TEXT127, "3"], [Blockly.Msg.TECHNOZONE51_TEXT128, "4"], [Blockly.Msg.TECHNOZONE51_TEXT129, "5"]]), "COLOR");
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT130);
  }
};

//robot_ihm_btn_def OK
Blockly.Blocks['technozone_robot_ihm_btn_def'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT131)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT120);
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT132);
  }
};

//robot_ihm_btn_read OK
Blockly.Blocks['technozone_robot_ihm_btn_read'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT5)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "10"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119)
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT108);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT133);
  }
};

//robot_ihm_inter_def OK
Blockly.Blocks['technozone_robot_ihm_inter_def'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT134)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT120);
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT135);
  }
};

//robot_ihm_inter_on OK
Blockly.Blocks['technozone_robot_ihm_inter_on'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(new Blockly.FieldDropdown([[Blockly.Msg.TECHNOZONE51_TEXT136, "1"], [Blockly.Msg.TECHNOZONE51_TEXT137, "0"]]), "COLOR")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT138)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT139);
  }
};

//robot_ihm_inter_read OK
Blockly.Blocks['technozone_robot_ihm_inter_read'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT138)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "10"]]), "LED")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT140);
    this.setInputsInline(true);
    this.setOutput(true, 'Boolean');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT141);
  }
};

//robot_ihm_potar_def OK
Blockly.Blocks['technozone_robot_ihm_potar_def'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT142)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT143)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["10", "10"], ["100", "100"], ["1000", "1000"]]), "DIVISOR");
    this.appendValueInput("POTARI",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT144)
        .setCheck('Number');
    this.appendValueInput("POTARA",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT145)
        .setCheck('Number');
    this.appendValueInput("POTARP",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT146)
        .setCheck('Number');
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT120);
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT147);
  }
};

//robot_ihm_potar_read OK
Blockly.Blocks['technozone_robot_ihm_potar_read'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:BTIHM1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT148)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "10"]]), "LED")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.setOutput(true, 'Number');
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT149);
  }
};

//robot_ihm_gauge_def
Blockly.Blocks['technozone_robot_ihm_gauge_def'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btihm1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT150)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.appendValueInput("GRADUATION", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT151);
    this.appendValueInput("TITRE", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT152);
    this.appendValueInput("CONTENT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT120);
    this.setInputsInline(false);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip(Blockly.Msg.TECHNOZONE51_TEXT153);
  }
};

//robot_ihm_gauge_write
Blockly.Blocks['technozone_robot_ihm_gauge_write'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT154)
        .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["A", "A"]]), "LED")
    this.appendDummyInput("")
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT119);
    this.appendValueInput("VALEUR",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT155)
        .setCheck('Number');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.TECHNOZONE51_TEXT156)
        .appendField(new Blockly.FieldDropdown([["0", "0"],["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"]]), "DECIMAL");
    this.setInputsInline(false);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Positionne une gauge IHM (réf : BTIHM1)');
  }
};

Blockly.Blocks['technozone_robot_move'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField("faire ")
        .appendField(new Blockly.FieldDropdown([["avancer", "0"], ["reculer", "1"]]), "DIR");
    this.appendValueInput("DISTANCE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(" le robot de ")
        .setCheck('Number');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(new Blockly.FieldDropdown([["cm", "1"], ["mm", "0"]]), "UNIT");
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(" en mode ")
        .appendField(new Blockly.FieldDropdown([["préemptif", "1"], ["non préemptif", "0"]]), "PREEMPTIF");
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Carte de commande de deux moteurs Pas à Pas pour EASYCON1,EASYCON2,EASYBOT1 (réf : PAP1)');
  }
};

Blockly.Blocks['technozone_robot_turn'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField("faire tourner le robot à ")
        .appendField(new Blockly.FieldDropdown([["droite", "0"], ["gauche", "1"]]), "ROT");
    this.appendValueInput("ANGLE",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(" de ")
        .setCheck('Number');
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(" degrés ");
    this.appendDummyInput("")
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("en mode ")
        .appendField(new Blockly.FieldDropdown([["préemptif", "1"], ["non préemptif", "0"]]), "PREEMPTIF");
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Carte de commande de deux moteurs Pas à Pas pour EASYCON1,EASYCON2,EASYBOT1 (réf : PAP1)');
  }
};

Blockly.Blocks['technozone_robot_stop'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:pap1');
    this.appendDummyInput("")
        .appendField("stopper le robot")
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Carte de commande de deux moteurs Pas à Pas pour EASYCON1,EASYCON2,EASYBOT1 (réf : PAP1)');
  }
};

Blockly.Blocks['technozone_robot_btn'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField("le bouton RUN/STOP est appuyé ?");
    this.setOutput(true, 'Boolean');
    this.setTooltip('Entrée bouton blanc (réf : BTN1-WHITE)');
  }
};

Blockly.Blocks['technozone_robot_irsend'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:buzzer1');
    this.appendDummyInput("")
		.appendField("déclencher une détection d'obstacles");
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Sortie Buzzer (réf : LED1-BUZZER1)');
  }
};

Blockly.Blocks['technozone_robot_irleft'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField("un obstacle a été détecté à gauche ?");
    this.setOutput(true, 'Boolean');
    this.setTooltip('Entrée bouton blanc (réf : BTN1-WHITE)');
  }
};

Blockly.Blocks['technozone_robot_ircenter'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField("un obstacle a été détecté au centre ?");
    this.setOutput(true, 'Boolean');
    this.setTooltip('Entrée bouton blanc (réf : BTN1-WHITE)');
  }
};

Blockly.Blocks['technozone_robot_irright'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField("un obstacle a été détecté à droite ?");
    this.setOutput(true, 'Boolean');
    this.setTooltip('Entrée bouton blanc (réf : BTN1-WHITE)');
  }
};

Blockly.Blocks['technozone_robot_ligleft'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField("une ligne a été détecté à gauche ?");
    this.setOutput(true, 'Boolean');
    this.setTooltip('Entrée bouton blanc (réf : BTN1-WHITE)');
  }
};

Blockly.Blocks['technozone_robot_ligright'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField("une ligne a été détecté à droite ?");
    this.setOutput(true, 'Boolean');
    this.setTooltip('Entrée bouton blanc (réf : BTN1-WHITE)');
  }
};

Blockly.Blocks['technozone_robot_buzzer_tone'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:buzzer1');
    this.appendValueInput("FREQUENCE",'Number')
        .appendField("émettre un son d'une fréquence ")
        .setCheck('Number');
    this.appendValueInput("DURATION",'Number')
        .appendField(" Hz pendant une durée de ")
        .setCheck('Number');
    this.appendDummyInput("")
		.appendField(" ms");
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Sortie Buzzer (réf : LED1-BUZZER1)');
  }
};

Blockly.Blocks['technozone_robot_lcdclear'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lcd1');
    this.appendDummyInput("")
        .appendField("effacer l'écran LCD")
        .appendField(new Blockly.FieldImage("blocks/technozone51/lcd1.jpg", 64, 64));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip("Efface l'écran LCD sur le bus I2C (réf : LCD1)");
  }
};

Blockly.Blocks['technozone_robot_lcdwrite'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lcd1');
    this.appendDummyInput("")
        .appendField("écrire sur l'écran LCD")
        .appendField(new Blockly.FieldImage("blocks/technozone51/lcd1.jpg", 64, 64))
    this.appendValueInput("TEXT", String)
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("le texte");
    this.appendDummyInput("")
        .appendField("à partir de la position :");
    this.appendValueInput("COL", 'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("colonne [0..MAXCOL-1]")
    this.appendValueInput("LIG",'Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField("ligne [0..MAXLIG-1]")
    this.setInputsInline(false);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip("Ecrire sur l'écran LCD (réf : LCD1)");
  }
};

Blockly.Blocks['technozone_robot_lcdspecial'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:lcd1');
    this.appendDummyInput("")
        .appendField("fonctions spéciales de l'écran LCD")
	this.appendDummyInput("")
        .appendField(new Blockly.FieldImage("blocks/technozone51/lcd1.jpg", 64, 64))
        .appendField(new Blockly.FieldDropdown([["active le curseur", "cursor"],["désactive le curseur", "noCursor"],["faire clignoter le curseur", "blink"],["arrête le clignotement du curseur", "noBlink"],["active l'affichage", "display"],["désactive l'affichage", "noDisplay"]]),"special");
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip("Fonction spéciales de l'écran LCD (réf : LCD1)");
  }
};

Blockly.Blocks['technozone_robot_ihm_init'] = {
  init: function() {
    this.setColour("#646464");
	this.setHelpUrl('http://www.techno-zone-51.fr/dokuwiki2/doku.php?id=documentation:btn1');
    this.appendDummyInput("")
        .appendField("initialiser la console IHM");
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Initialise la console IHM');
  }
};


text:
To install the Windows preview of the CLI follow these instructions:

- Download your desired release
  - Bare zip archives per release version are available on https://releases.manifold.co
- Unzip the file
- Put the `manifold.exe` file in your path
  - **System Settings**
  - **Advanced System Settings**
  - **Advanced**
  - **Environment Variables**
  - Edit **Path** in **System Variables** and add the full path to the folder where your `manifold.exe` file is

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>

  <References>
    <!-- <Assembly name="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" sn="true"/> -->
  </References>

  <Types>
    <Type alias="string" name="System.String" />
    <Type alias="int" name="System.Int32" />
    <Type alias="long" name="System.Int64" />
    <Type alias="char" name="System.Char" />
    <Type alias="bool" name="System.Boolean" />
    <Type alias="boolean" name="System.Boolean" />
    <Type alias="double" name="System.Double" />
    <Type alias="decimal" name="System.Decimal" />
    <Type alias="float" name="System.Single" />
    <Type alias="object" name="System.Object" />

    <Type alias="Array" name="System.Collections.Generic.List`1[[System.Object]]" />
    <Type alias="Expando" name="ScriptNET.Runtime.Expando" />
    <Type alias="Wrapper" name="ScriptNET.Runtime.ExpandoWrapper" />
  </Types>

  <Scopes>
    <!--Default Scope-->
    <Scope id="0" type="ScriptNET.Runtime.ScriptScopeActivator" />

    <!--Function Contract-->
    <Scope id="1" type="ScriptNET.Runtime.FunctionScopeActivator" />

    <!--Using statement-->
    <Scope id="2" type="ScriptNET.Runtime.ScriptUsingScopeActivator" />

    <!--Event scope-->
    <Scope id="3" type="ScriptNET.Runtime.EventScopeActivator" />

  </Scopes>

  <Operators>
    <Operator name="Plus" type="ScriptNET.Runtime.Operators.PlusOperator"/>
    <Operator name="Minus" type="ScriptNET.Runtime.Operators.MinusOperator"/>
    <Operator name="Mod" type="ScriptNET.Runtime.Operators.ModOperator"/>
    <Operator name="Div" type="ScriptNET.Runtime.Operators.DivOperator"/>
    <Operator name="Mul" type="ScriptNET.Runtime.Operators.MulOperator"/>
    <Operator name="Pow" type="ScriptNET.Runtime.Operators.PowOperator"/>

    <Operator name="Less" type="ScriptNET.Runtime.Operators.LessOperator"/>
    <Operator name="LessEquals" type="ScriptNET.Runtime.Operators.LqOperator"/>
    <Operator name="Greater" type="ScriptNET.Runtime.Operators.GrOperator"/>
    <Operator name="GreaterEquals" type="ScriptNET.Runtime.Operators.GqOperator"/>

    <Operator name="And" type="ScriptNET.Runtime.Operators.AndOperator"/>
    <Operator name="And2" type="ScriptNET.Runtime.Operators.And2Operator"/>
    <Operator name="Or" type="ScriptNET.Runtime.Operators.OrOperator"/>
    <Operator name="Or2" type="ScriptNET.Runtime.Operators.Or2Operator"/>
    <Operator name="Equals" type="ScriptNET.Runtime.Operators.EqualsOperator"/>
    <Operator name="NotEquals" type="ScriptNET.Runtime.Operators.NotEqualsOperator"/>

    <Operator name="Is" type="ScriptNET.Runtime.Operators.IsOperator"/>

    <!-- Unary -->
    <Operator name="Negate1" type="ScriptNET.Runtime.Operators.NegateOperator1"/>
    <Operator name="Negate2" type="ScriptNET.Runtime.Operators.NegateOperator2"/>
    <Operator name="Negate3" type="ScriptNET.Runtime.Operators.NegateOperator3"/>
  </Operators>

  <Settings>
    <Item id="UnsubscribeAllEvents" value="true" converter="System.ComponentModel.BooleanConverter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    <Item id="ScopeFactory" value="ScriptNET.Runtime.ScopeFactory" />
    <Item id="ScriptableObjectType" value="ScriptNET.Runtime.Expando" />
  </Settings>

  <Initialization>
    <![CDATA[
    ]]>
  </Initialization>
</Configuration>


text:
define(['underscore'],
    function (_) {

        var parseDateFromIso8601String = function (dateString) {

            if (dateString === null)
                return null;
            if (dateString === undefined)
                return undefined;

            //if (Object.prototype.toString.call(dateString) === '[object String]' && _s.include(dateString, "T") && _s.endsWith(dateString, "Z"))
            if (Object.prototype.toString.call(dateString) === '[object String]' && _.include(dateString, "T"))
                return moment(dateString).toDate();
            else
                throw ("parseDateFromIso8601String expects string in iso 8601 format (specifically the one ending with Z).");
        };

        var parseDate = function (dateOrIso8601String) {

            if (dateOrIso8601String === null)
                return null;
            if (dateOrIso8601String === undefined)
                return undefined;

            if (Object.prototype.toString.call(dateOrIso8601String) === '[object Date]')
                return dateOrIso8601String;
                //else if (Object.prototype.toString.call(dateOrIso8601String) === '[object String]' && _s.include(dateOrIso8601String, "T") && _s.endsWith(dateOrIso8601String, "Z")) {
            else if (Object.prototype.toString.call(dateOrIso8601String) === '[object String]' && _.include(dateOrIso8601String, "T")) {
                return moment(dateOrIso8601String).toDate();
            } else
                throw ("utils.parseDate only accepts Date object or string in iso 8601 format (specifically the one ending with Z).");
        };

        var formatAsDate = function (dateOrIso8601String) {

            if (dateOrIso8601String === null || dateOrIso8601String === undefined || dateOrIso8601String === "0001-01-01T00:00:00Z")
                return "";

            var date = parseDate(dateOrIso8601String);

            return moment(date).format('D.M.YYYY');
        };

        var formatAsTimeLong = function (dateOrIso8601String) {

            if (dateOrIso8601String === null || dateOrIso8601String === undefined)
                return "";

            var date = parseDate(dateOrIso8601String);

            return moment(date).format('HH:mm:ss');
        };

        var formatAsTime = function (dateOrIso8601String) {

            if (dateOrIso8601String === null || dateOrIso8601String === undefined)
                return "";

            var date = parseDate(dateOrIso8601String);

            return moment(date).format('HH:mm');
        };

        var formatAsDateTimeLong = function (dateOrIso8601String) {

            if (dateOrIso8601String === null || dateOrIso8601String === undefined)
                return "";

            var date = parseDate(dateOrIso8601String);
            //var date = parseDate("2015-07-14T09:46:41");

            return moment(date).format('D.M.YYYY HH:mm:ss');
        };

        var formatAsDateTime = function (dateOrIso8601String) {

            if (dateOrIso8601String === null || dateOrIso8601String === undefined)
                return "";

            var date = parseDate(dateOrIso8601String);

            return moment(date).format('D.M.YYYY HH:mm');
        };

        var formatAsCurrency = function (value) {
            if (value === "" || value === null || value === undefined) return "-";
            return numeral(value).format('0,0.00');
        };

        //Return string for edit decimal 1000.456789 return 1000,456789
        var formatDecimalForEdit = function (x) {
            if (x === "" || x === null || x === undefined || isNaN(x)) return "";
            if (Math.floor(x) == x) return x;
            if ((x + "").split(".")[1].length === 1) return x.toFixed(1).replace('.', ',');

            var formatted = x.toString().replace('.', ',');;
            return formatted;
        };

        //formats decimal 10000.4567 => 10000,46
        var formatWithComma = function (x, precision, seperator) {
            if (x === "" || x === null || x === undefined || isNaN(x)) return "";
            if (Math.floor(x) === x) return x;

            //hack, Martin 12.1.2017: does not process x = 1e-8:
            if (!(x + "").split(".")[1]) return "0";
            //end hack

            if ((x + "").split(".")[1].length === 1) return x.toFixed(1).replace('.', ',');
            var options = {
                precision: precision || 2,
                seperator: seperator || ','
            };

            if (precision === 0)
                options.precision = 0;

            return numeral(x).format('0[.]' + Array(options.precision + 1).join("0"));

            // var formatted = x.toFixed(options.precision);
            // var regex = new RegExp('^(\\d+)[^\\d](\\d{' + options.precision + '})$');
            // formatted = formatted.replace(regex, '$1' + options.seperator + '$2');
            //  return formatted;
        };
        //formats decimal 10000.4567 => 10.000,46
        var formatWithCommaAndThousandSepparator = function (x, precision, seperator) {
            if (x === "" || x === null || x === undefined || isNaN(x)) return "";
            if (Math.floor(x) === x) return numeral(x).format('0,0'); //Tale zadeva tukaj ne upošteva precision in če je cela cifra, potem nimaš decimalk

            var options = {
                precision: precision || 2,
                seperator: seperator || ','
            };

            if (precision === 0)
                options.precision = 0;

            return numeral(x).format('0,0[.]' + Array(options.precision + 1).join("0"));

            //var withcomma = formatWithComma(x, precision, seperator);
            //if (withcomma === "" || withcomma === null || withcomma === undefined || (Math.floor(x) === x && x < 1000)) return withcomma;
            //return (withcomma + "").replace(/\B(?=(\d{3})+(?!\d))/g, "."); //tale del zamenja thousend sepparator z .
        }
        var reverseFormat = function (x, precision, seperator) {
            if (x === "" || x === null || x === undefined) return undefined;
            if (typeof x === "number") return x;
            return numeral(x).value();
            //if (x.indexOf(',') === -1) {
            //    return parseFloat(x.replace('.', ''));
            //}
            //for sl numbers 1.000,56 first we remove dot's and ther change comma to . and try parse
            //return parseFloat(x.replace(/\./g, '').replace(',', '.'));
        };

        function isNumber(n) {
            'use strict';
            n = n.replace(/\./g, '').replace(',', '.');
            return !isNaN(parseFloat(n)) && isFinite(n);
        }

        var formatDuration = function (ticks) {
            if (!ticks) return "";

            var durationInMiliseconds = ticks / 10000;
            var durationInHours = (moment.duration(durationInMiliseconds).hours() !== 0 ? (moment.duration(durationInMiliseconds).hours() + "u ") : "");
            var durationInMinutes = (moment.duration(durationInMiliseconds).minutes() !== 0 ? (moment.duration(durationInMiliseconds).minutes() + "m ") : "");
            var duration = durationInHours + durationInMinutes;
            return duration;
        }

        var dateTimeRangePickerPresets = {
            Today: { label: "Today", from: moment().startOf('day'), to: moment().endOf('day').subtract(1, 'second') },
            Yesterday: { label: "Yesterday", from: moment().subtract(1, 'days').startOf('day'), to: moment().subtract(1, 'days').endOf('day').subtract(1, 'second') },
            Tomorrow: { label: "Tomorrow", from: moment().add(1, 'days').startOf('day'), to: moment().add(1, 'days').endOf('day').subtract(1, 'second') },
            ThisWeek: { label: "This Week", from: moment().day(1).startOf('day'), to: moment().day(7).endOf('day').subtract(1, 'second') },
            NextWeek: { label: "Next Week", from: moment().day(8).startOf('day'), to: moment().day(14).endOf('day').subtract(1, 'second') },
            PreviousWeek: { label: "Previous Week", from: moment().day(1).subtract(1, 'weeks').startOf('day'), to: moment().day(1).subtract(1, 'days').endOf('day').subtract(1, 'second') },
            ThisMonth: { label: "This Month", from: moment().date(1).startOf('day'), to: moment().date(1).add(1, 'months').subtract(1, 'days').endOf('day').subtract(1, 'second') },
            PreviousMonth: { label: "Previous Month", from: moment().date(1).subtract(1, 'months').startOf('day'), to: moment().date(1).subtract(1, 'days').endOf('day').subtract(1, 'second') }
        };

        /***********************************************************
         * back button intercepting
         *   http://stackoverflow.com/questions/1844491/intercepting-call-to-the-back-button-in-my-ajax-application-i-dont-want-it-to
         *************************************************************/
        var backButtonsWatcherInterval;
        var setBackButtonsWatcherInterval = function () {
            if (backButtonsWatcherInterval) return;

            var search = window.location.search;
            backButtonsWatcherInterval = setInterval(function () {
                if (window.location.search !== search) {
                    search = window.location.search;
                    location.reload();
                    //alert("User went back or forward to application state represented by " + search);
                }
            }, 100);
        };

        var stopBackButtonsWatcherInterval = function () {
            if (backButtonsWatcherInterval) {
                clearInterval(backButtonsWatcherInterval);
                backButtonsWatcherInterval = "";
            }
        }

        //public function for setting up page Title and possible
        var setUrlAndTitle = function (options) {
            var o = {
                title: "???",
                url: "",
                urlName: "Object",
                filterData: null
            };
            o = $.extend(o, options || {});
            var hash = "";
            $('.title').text(o.title);
            $(document).prop('title', o.title);

            stopBackButtonsWatcherInterval();
            if (o.url) {
                if (o.filterData) {
                    hash = createUrlHash(o.filterData);
                }

                if (hash) {
                    o.url += "#" + hash;
                }
                if (window.history && window.history.pushState) {
                    var href = window.location.href.replace(window.location.origin, "");
                    if (href !== o.url)
                        window.history.pushState("object or string", o.urlName, o.url);
                }

                setBackButtonsWatcherInterval();
            }
        };

        var setTitle = function (options) {
            var o = {
                title: "???"
            };
            o = $.extend(o, options || {});

            $('.title').text(o.title);
            $(document).prop('title', o.title);
        };

        var setUrl = function (options) {
            var o = {
                url: "",
                urlName: "Object"
            };
            o = $.extend(o, options || {});

            stopBackButtonsWatcherInterval();
            if (o.url) {
                if (window.history && window.history.pushState) {
                    window.history.pushState("object or string", o.urlName, o.url);
                }

                setBackButtonsWatcherInterval();
            }
        };

        var generateAutoId = function (prefix) {
            var randLetter = String.fromCharCode(65 + Math.floor(Math.random() * 26));
            return prefix + randLetter + Date.now();
        }

        //Method for coloring founded locations with autocomplete
        var generateHighlitedItem = function (item, searchText) {
            if (!item) return item;
            if (!searchText) return item;
            var phrases = searchText.split(" ");
            _.each(phrases,
                function (phrase) {
                    var index = item.toLowerCase().indexOf(phrase);
                    if (index > -1) {
                        item = [item.slice(0, index), "", item.slice(index, index + phrase.length), "", item.slice(index + phrase.length)].join('');
                    }

                });
            return item;
        };

        var getBodyScrollPosition = function () {
            return $("#Body").scrollTop();
        };
        var setBodyScrollPosition = function (pixels) {
            setTimeout(function () { $("#Body").scrollTop(pixels); }, 0);
        };

        var createUrlHash = function (data) {
            var hash = "filter=" + btoa(Arg.url("", data).slice(1)); //slice removes firts char from string (?)
            //window.location.hash =
            //First we from object {date=12.3.2017, name='janez'} we create url string => ?name=janez&date=12.3.2017 with Arg.url
            //then we encode that string with btoa (hash) and set this to filter property
            return hash;
        };

        var getUrlHash = function () {
            //the oposite of method createUrlHash => we need object { name: 'fff'}
            var hash = Arg.hash(); //glej arg-1.2.js    https://github.com/stretchr/arg.js?files=1
            if (!hash) return null;
            if (!hash.filter) return null;
            var hashFilter = Arg.parse(atob(hash.filter));
            return hashFilter;
        }

        //Global function
        isNumeric = function (n) {
            return !isNaN(parseFloat(n)) && isFinite(n);
        };
        return {
            parseDate: parseDate,
            parseDateFromIso8601String: parseDateFromIso8601String,
            formatAsDate: formatAsDate,
            formatAsTimeLong: formatAsTimeLong,
            formatAsTime: formatAsTime,
            formatAsDateTimeLong: formatAsDateTimeLong,
            formatAsDateTime: formatAsDateTime,
            formatDuration: formatDuration,
            dateTimeRangePickerPresets: dateTimeRangePickerPresets,
            formatAsCurrency: formatAsCurrency,
            formatDecimalForEdit: formatDecimalForEdit,
            formatWithComma: formatWithComma,
            formatWithCommaAndThousandSepparator: formatWithCommaAndThousandSepparator,
            reverseFormat: reverseFormat,
            isNumber: isNumber,
            setUrlAndTitle: setUrlAndTitle,
            setTitle: setTitle,
            setUrl: setUrl,
            generateAutoId: generateAutoId,
            generateHighlitedItem: generateHighlitedItem,
            setBodyScrollPosition: setBodyScrollPosition,
            getBodyScrollPosition: getBodyScrollPosition,
            createUrlHash: createUrlHash,
            getUrlHash: getUrlHash
        };
    });


text:
//
//  Public.h
//  gcdqn
//
//  Created by admin on 16/7/19.
//  Copyright © 2016年 hardtosaygoodbye. All rights reserved.
//

#ifndef Public_h
#define Public_h

//系统的版本号
#define SystemVersion ([[[UIDevice currentDevice]systemVersion]floatValue])

//获取设备的物理高度
#define ScreenHeight ([UIScreen mainScreen].bounds.size.height)

//获取设备的物理宽度
#define ScreenWidth ([UIScreen mainScreen].bounds.size.width)

//快捷rgb颜色
#define RGBColor(r,g,b,a) ([UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a])

//李旭调试代码
#define LX_DEBUG 1

#endif /* Public_h */


text:
package org.apache.struts2.views.velocity.components;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.ActionError;
import org.apache.struts2.components.Component;

import com.opensymphony.xwork2.util.ValueStack;

/**
 * @see ActionError
 */
public class ActionErrorDirective extends AbstractDirective {
    public String getBeanName() {
        return "actionerror";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new ActionError(stack, req, res);
    }
}


text:
{-# LANGUAGE OverloadedStrings, FlexibleContexts, QuasiQuotes  #-}
module Numerus.Core where

import Control.Applicative
import Control.Monad

import qualified Data.ByteString.Char8 as C8
import Data.Pool
import Data.Maybe
import Data.Monoid (mconcat)

import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.SqlQQ

import Web.Scotty

go :: Int -> String -> IO ()
go port db =
  mkPool db >>= \pool -> migrate pool  >> (scotty port $ route pool)

route :: Pool Connection -> ScottyM ()
route pool = do
  post "/build/:library/:version" $ do
    library <- param "library"
    version <- param "version"
    x <- runDb pool $ \c -> do
      error "todo"
    html $ mconcat ["
Scotty, ", beam, " me up!
"]

migrate :: Pool Connection -> IO ()
migrate pool = runDb pool $ \c -> do
  void $  execute_ c [sql|CREATE TABLE IF NOT EXISTS migration_info (migration INT PRIMARY KEY)|]
  forM_ migrations (runMigration c)

runMigration :: Connection -> (Int, Query) -> IO ()
runMigration c (v, q) = do
  e <- exists c [sql| SELECT TRUE FROM migration_info WHERE migration = ? |] (Only v)
  unless e $ do
     void $ execute c [sql| INSERT INTO migration_info (migration) VALUES (?) |] (Only v)
     void $ execute_ c q

list :: (ToRow a, FromRow b) => Connection -> Query -> a ->  IO [b]
list c q v = query c q v

fetch :: (ToRow a, FromRow b) => Connection -> Query -> a -> IO (Maybe b)
fetch c q v =
  fmap listToMaybe $ list c q v

fetch' :: (ToRow a, FromRow (Only b)) => Connection -> Query -> a ->  IO (Maybe b)
fetch' c q v =
  fmap (fmap fromOnly) $ fetch c q v

exists :: (ToRow a) => Connection -> Query -> a ->  IO Bool
exists c q v =
  isJust <$> (fetch' c q v :: IO (Maybe Bool))

runDb :: Pool Connection -> (Connection -> IO a) -> IO a
runDb pool f =
  withResource pool (\conn -> withTransaction conn (f conn))

mkPool :: String -> IO (Pool Connection)
mkPool cfg =
  createPool (connectPostgreSQL . C8.pack $ cfg) close 1 20 10

migrations :: [(Int, Query)]
migrations = [
    (1, "CREATE TABLE library (id integer NOT NULL PRIMARY KEY, name character varying NOT NULL)")
  , (2, "CREATE TABLE build_number (id integer NOT NULL PRIMARY KEY, library integer NOT NULL, version character varying NOT NULL, build integer NOT NULL default -1)")
  ]


text:
// Copyright 2017 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.vfs;

import java.io.InvalidObjectException;
import java.io.ObjectInputStream;

/**
 * Abstract base class for {@link PathFragment} instances that will be allocated when Blaze is run
 * on a Windows platform.
 */
abstract class WindowsPathFragment extends PathFragment {
  static final Helper HELPER = new Helper();

  protected final char driveLetter;

  protected WindowsPathFragment(char driveLetter, String[] segments) {
    super(segments);
    this.driveLetter = driveLetter;
  }

  @Override
  public String windowsVolume() {
    return (driveLetter != '\0') ? driveLetter + ":" : "";
  }

  @Override
  public char getDriveLetter() {
    return driveLetter;
  }

  @Override
  protected int computeHashCode() {
    int h = 0;
    for (String segment : segments) {
      int segmentHash = segment.toLowerCase().hashCode();
      h = h * 31 + segmentHash;
    }
    return h;
  }

  private static class Helper extends PathFragment.Helper {
    private static final char SEPARATOR_CHAR = '/';
    // TODO(laszlocsomor): Lots of internal PathFragment operations, e.g. getPathString, use the
    // primary separator char and do not use this.
    private static final char EXTRA_SEPARATOR_CHAR = '\\';

    @Override
    PathFragment create(String path) {
      // TODO(laszlocsomor): Character#isLetter returns true for some non ASCII characters.
      char driveLetter =
          path.length() >= 2 && path.charAt(1) == ':' && Character.isLetter(path.charAt(0))
              ? Character.toUpperCase(path.charAt(0))
              : '\0';
      if (driveLetter != '\0') {
        path = path.substring(2);
        // TODO(bazel-team): Decide what to do about non-absolute paths with a volume name, e.g.
        // C:x.
      }
      boolean isAbsolute = path.length() > 0 && isSeparator(path.charAt(0));
      return isAbsolute
          ? new AbsoluteWindowsPathFragment(driveLetter, segment(path, 1))
          : new RelativeWindowsPathFragment(driveLetter, segment(path, 0));
    }

    @Override
    PathFragment createAlreadyInterned(char driveLetter, boolean isAbsolute, String[] segments) {
      return isAbsolute
          ? new AbsoluteWindowsPathFragment(driveLetter, segments)
          : new RelativeWindowsPathFragment(driveLetter, segments);
    }

    @Override
    char getPrimarySeparatorChar() {
      return SEPARATOR_CHAR;
    }

    @Override
    boolean isSeparator(char c) {
      return c == SEPARATOR_CHAR || c == EXTRA_SEPARATOR_CHAR;
    }

    @Override
    boolean containsSeparatorChar(String path) {
      // TODO(laszlocsomor): This is inefficient.
      return path.indexOf(SEPARATOR_CHAR) != -1 || path.indexOf(EXTRA_SEPARATOR_CHAR) != -1;
    }

    @Override
    boolean segmentsEqual(int length, String[] segments1, int offset1, String[] segments2) {
      if ((segments1.length - offset1) < length || segments2.length < length) {
        return false;
      }
      for (int i = 0; i < length; ++i) {
        String seg1 = segments1[i + offset1];
        String seg2 = segments2[i];
        if ((seg1 == null) != (seg2 == null)) {
          return false;
        }
        if (seg1 == null) {
          continue;
        }
        // TODO(laszlocsomor): The calls to String#toLowerCase are inefficient and potentially
        // repeated too. Also, why not use String#equalsIgnoreCase.
        seg1 = seg1.toLowerCase();
        seg2 = seg2.toLowerCase();
        if (!seg1.equals(seg2)) {
          return false;
        }
      }
      return true;
    }

    @Override
    protected int compare(PathFragment pathFragment1, PathFragment pathFragment2) {
      if (pathFragment1.isAbsolute() != pathFragment2.isAbsolute()) {
        return pathFragment1.isAbsolute() ? -1 : 1;
      }
      int cmp = Character.compare(pathFragment1.getDriveLetter(), pathFragment2.getDriveLetter());
      if (cmp != 0) {
        return cmp;
      }
      String[] segments1 = pathFragment1.segments();
      String[] segments2 = pathFragment2.segments();
      int len1 = segments1.length;
      int len2 = segments2.length;
      int n = Math.min(len1, len2);
      for (int i = 0; i < n; i++) {
        String seg1 = segments1[i].toLowerCase();
        String seg2 = segments2[i].toLowerCase();
        cmp = seg1.compareTo(seg2);
        if (cmp != 0) {
          return cmp;
        }
      }
      return len1 - len2;
    }
  }

  private static final class AbsoluteWindowsPathFragment extends WindowsPathFragment {
    private AbsoluteWindowsPathFragment(char driveLetter, String[] segments) {
      super(driveLetter, segments);
    }

    @Override
    public boolean isAbsolute() {
      return true;
    }

    @Override
    protected int computeHashCode() {
      int h = Boolean.TRUE.hashCode();
      h = h * 31 + super.computeHashCode();
      h = h * 31 + Character.valueOf(getDriveLetter()).hashCode();
      return h;
    }

    @Override
    public boolean equals(Object other) {
      if (!(other instanceof AbsoluteWindowsPathFragment)) {
        return false;
      }
      if (this == other) {
        return true;
      }
      AbsoluteWindowsPathFragment otherAbsoluteWindowsPathFragment =
          (AbsoluteWindowsPathFragment) other;
      return this.driveLetter == otherAbsoluteWindowsPathFragment.driveLetter
          && HELPER.segmentsEqual(this.segments, otherAbsoluteWindowsPathFragment.segments);
    }

    // Java serialization looks for the presence of this method in the concrete class. It is not
    // inherited from the parent class.
    @Override
    protected Object writeReplace() {
      return super.writeReplace();
    }

    // Java serialization looks for the presence of this method in the concrete class. It is not
    // inherited from the parent class.
    @Override
    protected void readObject(ObjectInputStream stream) throws InvalidObjectException {
      super.readObject(stream);
    }
  }

  private static final class RelativeWindowsPathFragment extends WindowsPathFragment {
    private RelativeWindowsPathFragment(char driveLetter, String[] segments) {
      super(driveLetter, segments);
    }

    @Override
    public boolean isAbsolute() {
      return false;
    }

    @Override
    protected int computeHashCode() {
      int h = Boolean.FALSE.hashCode();
      h = h * 31 + super.computeHashCode();
      if (!isEmpty()) {
        h = h * 31 + Character.valueOf(getDriveLetter()).hashCode();
      }
      return h;
    }

    @Override
    public boolean equals(Object other) {
      if (!(other instanceof RelativeWindowsPathFragment)) {
        return false;
      }
      if (this == other) {
        return true;
      }
      RelativeWindowsPathFragment otherRelativeWindowsPathFragment =
          (RelativeWindowsPathFragment) other;
      return isEmpty() && otherRelativeWindowsPathFragment.isEmpty()
          ? true
          : this.driveLetter == otherRelativeWindowsPathFragment.driveLetter
              && HELPER.segmentsEqual(this.segments, otherRelativeWindowsPathFragment.segments);
    }

    private boolean isEmpty() {
      return segmentCount() == 0;
    }

    // Java serialization looks for the presence of this method in the concrete class. It is not
    // inherited from the parent class.
    @Override
    protected Object writeReplace() {
      return super.writeReplace();
    }

    // Java serialization looks for the presence of this method in the concrete class. It is not
    // inherited from the parent class.
    @Override
    protected void readObject(ObjectInputStream stream) throws InvalidObjectException {
      super.readObject(stream);
    }
  }
}


text:
#include "config.h"
#include "WKSecurityOrigin.h"

#include "WKAPICast.h"
#include "WebSecurityOrigin.h"

using namespace WebKit;

WKTypeID WKSecurityOriginGetTypeID()
{
    return toAPI(WebSecurityOrigin::APIType);
}

WKSecurityOriginRef WKSecurityOriginCreateFromString(WKStringRef string)
{
    RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::createFromString(toImpl(string)->string());
    return toAPI(securityOrigin.release().leakRef());
}

WKSecurityOriginRef WKSecurityOriginCreateFromDatabaseIdentifier(WKStringRef identifier)
{
    RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::createFromDatabaseIdentifier(toImpl(identifier)->string());
    return toAPI(securityOrigin.release().leakRef());
}

WKSecurityOriginRef WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port)
{
    RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::create(toImpl(protocol)->string(), toImpl(host)->string(), port);
    return toAPI(securityOrigin.release().leakRef());
}

WKStringRef WKSecurityOriginCopyDatabaseIdentifier(WKSecurityOriginRef securityOrigin)
{
    return toCopiedAPI(toImpl(securityOrigin)->databaseIdentifier());
}

WKStringRef WKSecurityOriginCopyToString(WKSecurityOriginRef securityOrigin)
{
    return toCopiedAPI(toImpl(securityOrigin)->toString());
}

WKStringRef WKSecurityOriginCopyProtocol(WKSecurityOriginRef securityOrigin)
{
    return toCopiedAPI(toImpl(securityOrigin)->protocol());
}

WKStringRef WKSecurityOriginCopyHost(WKSecurityOriginRef securityOrigin)
{
    return toCopiedAPI(toImpl(securityOrigin)->host());
}

unsigned short WKSecurityOriginGetPort(WKSecurityOriginRef securityOrigin)
{
    return toImpl(securityOrigin)->port();
}

// For backwards ABI compatibility.
extern "C" WK_EXPORT WKStringRef WKSecurityOriginGetHost(WKSecurityOriginRef securityOrigin);
extern "C" WK_EXPORT WKStringRef WKSecurityOriginGetProtocol(WKSecurityOriginRef securityOrigin);

WKStringRef WKSecurityOriginGetHost(WKSecurityOriginRef securityOrigin)
{
    return WKSecurityOriginCopyHost(securityOrigin);
}

WKStringRef WKSecurityOriginGetProtocol(WKSecurityOriginRef securityOrigin)
{
    return WKSecurityOriginCopyProtocol(securityOrigin);
}


text:
package stash.samples.hockeyloader.network.util.gson.typeadapters;

import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;

import java.io.IOException;
import java.util.concurrent.atomic.AtomicReference;

/** Adapter for abstract classes and interfaces that need to store their complete subclass information. */
public class AbstractTypeAdapter<T> extends TypeAdapter<T> {
    private final Gson gson;

    public AbstractTypeAdapter(Gson gson) {
        this.gson = gson;
    }

    @Override
    public void write(JsonWriter out, T t) throws IOException {
        if (t == null) {
            out.nullValue();
        } else {
            out.beginObject();
            out.name("class");
            out.value(t.getClass().getName());
            out.name("item");
            write(out, gson.getAdapter(t.getClass()), t);
            out.endObject();
        }
    }

    @Override
    public T read(JsonReader in) throws IOException {
        if (in.peek() == JsonToken.NULL) {
            in.nextNull();
            return null;
        }
        T t = null;
        AtomicReference<String> className = new AtomicReference<>();
        in.beginObject();
        while (in.hasNext()) {
            T test = eachAttribute(in, className);
            if (test != null) {
                t = test;
            }
        }
        in.endObject();
        return t;
    }

    private T eachAttribute(JsonReader in, AtomicReference<String> classname) throws IOException {
        String attributeName = in.nextName();
        switch (attributeName.charAt(0)) {
            case 'c':
                if ("class".equals(attributeName)) {
                    classname.set(in.nextString());
                    return null;
                }
                break;
            case 'i':
                if ("item".equals(attributeName) && classname.get() != null) {
                    try {
                        @SuppressWarnings("unchecked")
                        Class<? extends T> clazz
                                = (Class<? extends T>) Class.forName(classname.get());
                        TypeAdapter<? extends T> typeAdapter = gson.getAdapter(clazz);
                        return typeAdapter.read(in);
                    } catch (Exception e) {
                        // ignore
                    }
                }
                break;
            default:
        }
        in.skipValue();
        return null;
    }

    @SuppressWarnings("unchecked")
    private static <T> void write(JsonWriter out, TypeAdapter<T> itemTypeAdapter, Object value) throws IOException {
        itemTypeAdapter.write(out, (T) value);
    }
}


text:
typedef uint32_t Colour;
typedef uint8_t Time;

class Light {
private:
	Adafruit_NeoPixel* neopixel;
	uint16_t iteration;
	uint16_t chaseThird;

	void iterate(void);
	void chase(void);

	Colour colourWheel(byte);

public:
	Light(Adafruit_NeoPixel*);

	void runFunc(volatile byte*, bool);

	void blank();
	void colorWipe(Colour, Time);
	void rainbow(Time);
	void rainbowCycle(Time);
	void theaterChase(Colour, Time);
	void theaterChaseRainbow(Time);
};