initial gps ttn mapper code
This commit is contained in:
@@ -119,6 +119,33 @@ Blockly.Blocks['sensebox_send_lora_sensor_value'] = {
|
||||
LOOP_TYPES: ['sensebox_lora_message_send'],
|
||||
};
|
||||
|
||||
Blockly.Blocks['sensebox_lora_ttn_mapper'] = {
|
||||
init: function (block) {
|
||||
this.setColour(getColour().sensebox);
|
||||
this.appendDummyInput()
|
||||
.appendField("TTN Mapper")
|
||||
this.appendValueInput('Latitude')
|
||||
.appendField('Latitude')
|
||||
.setCheck(null);
|
||||
this.appendValueInput('Longitude')
|
||||
.appendField('Longitude')
|
||||
.setCheck(null);
|
||||
this.appendValueInput('Altitude')
|
||||
.appendField('Altitude')
|
||||
.setCheck(null);
|
||||
this.appendValueInput('pDOP')
|
||||
.appendField('pDOP')
|
||||
.setCheck(null);
|
||||
this.appendValueInput('Fix Type')
|
||||
.appendField('Fix Type')
|
||||
.setCheck(null);
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
this.setTooltip(Blockly.Msg.senseBox_display_printDisplay_tip);
|
||||
this.setHelpUrl('https://sensebox.de/books');
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['sensebox_lora_cayenne_send'] = {
|
||||
init: function () {
|
||||
this.setTooltip(Blockly.Msg.senseBox_LoRa_cayenne_tip);
|
||||
|
||||
@@ -321,3 +321,25 @@ Blockly.Blocks['sensebox_scd30'] = {
|
||||
this.setTooltip(Blockly.Msg.senseBox_bme_tip);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* GPS Module
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Blockly.Blocks['sensebox_gps'] = {
|
||||
init: function () {
|
||||
var dropdownOptions = [["Latitude", "latitude"], ["Longitude", "longitude"], ["Altitude", "altitude"], ["pDOP", "pDOP"], ["Fix Type", "fixType"]];
|
||||
this.appendDummyInput()
|
||||
.appendField("GPS Modul");
|
||||
this.appendDummyInput()
|
||||
.setAlign(Blockly.ALIGN_RIGHT)
|
||||
.appendField(Blockly.Msg.senseBox_value)
|
||||
.appendField(new Blockly.FieldDropdown(dropdownOptions), "dropdown")
|
||||
this.setOutput(true, Types.NUMBER.typeName);
|
||||
this.setColour(getColour().sensebox);
|
||||
this.setTooltip(Blockly.Msg.senseBox_bme_tip);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user