Browse Source

Added getters for sensors

fastled
Xose Pérez 7 years ago
parent
commit
de4780efbc
18 changed files with 3325 additions and 3152 deletions
  1. +2
    -2
      code/espurna/config/sensors.h
  2. BIN
      code/espurna/data/index.html.gz
  3. +5
    -5
      code/espurna/domoticz.ino
  4. +18
    -13
      code/espurna/sensor.ino
  5. +6
    -0
      code/espurna/sensors/BMX280Sensor.h
  6. +12
    -0
      code/espurna/sensors/DHTSensor.h
  7. +19
    -4
      code/espurna/sensors/DallasSensor.h
  8. +27
    -2
      code/espurna/sensors/DigitalSensor.h
  9. +8
    -0
      code/espurna/sensors/EmonADC121Sensor.h
  10. +20
    -0
      code/espurna/sensors/EmonADS1X15Sensor.h
  11. +28
    -7
      code/espurna/sensors/EmonSensor.h
  12. +30
    -5
      code/espurna/sensors/EventSensor.h
  13. +18
    -3
      code/espurna/sensors/MHZ19Sensor.h
  14. +18
    -3
      code/espurna/sensors/PMSX003Sensor.h
  15. +6
    -0
      code/espurna/sensors/SI7021Sensor.h
  16. +3079
    -3079
      code/espurna/static/index.html.gz.h
  17. +22
    -22
      code/html/custom.js
  18. +7
    -7
      code/html/index.html

+ 2
- 2
code/espurna/config/sensors.h View File

@ -93,7 +93,7 @@
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
#ifndef BMX280_SUPPORT #ifndef BMX280_SUPPORT
#define BMX280_SUPPORT 1
#define BMX280_SUPPORT 0
#endif #endif
#ifndef BMX280_ADDRESS #ifndef BMX280_ADDRESS
@ -283,7 +283,7 @@
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
#ifndef SI7021_SUPPORT #ifndef SI7021_SUPPORT
#define SI7021_SUPPORT 1
#define SI7021_SUPPORT 0
#endif #endif
#ifndef SI7021_ADDRESS #ifndef SI7021_ADDRESS


BIN
code/espurna/data/index.html.gz View File


+ 5
- 5
code/espurna/domoticz.ino View File

@ -91,12 +91,12 @@ void _domoticzWebSocketOnSend(JsonObject& root) {
relays.add(domoticzIdx(i)); relays.add(domoticzIdx(i));
} }
JsonArray& sensors = root.createNestedArray("dczSensors");
JsonArray& list = root.createNestedArray("dczMagnitudes");
for (byte i=0; i<magnitudeCount(); i++) { for (byte i=0; i<magnitudeCount(); i++) {
JsonObject& sensor = sensors.createNestedObject();
sensor["name"] = magnitudeName(i);
sensor["type"] = magnitudeType(i);
sensor["idx"] = getSetting("dczSensor", i, 0).toInt();
JsonObject& element = list.createNestedObject();
element["name"] = magnitudeName(i);
element["type"] = magnitudeType(i);
element["idx"] = getSetting("dczMagnitude", i, 0).toInt();
} }
#if POWER_PROVIDER != POWER_PROVIDER_NONE #if POWER_PROVIDER != POWER_PROVIDER_NONE


+ 18
- 13
code/espurna/sensor.ino View File

@ -120,19 +120,19 @@ void _sensorWebSocketOnSend(JsonObject& root) {
char buffer[10]; char buffer[10];
bool hasTemperature = false; bool hasTemperature = false;
JsonArray& sensors = root.createNestedArray("sensors");
JsonArray& list = root.createNestedArray("magnitudes");
for (unsigned char i=0; i<_magnitudes.size(); i++) { for (unsigned char i=0; i<_magnitudes.size(); i++) {
sensor_magnitude_t magnitude = _magnitudes[i]; sensor_magnitude_t magnitude = _magnitudes[i];
unsigned char decimals = _sensorDecimals(magnitude.type); unsigned char decimals = _sensorDecimals(magnitude.type);
dtostrf(magnitude.current, 1-sizeof(buffer), decimals, buffer); dtostrf(magnitude.current, 1-sizeof(buffer), decimals, buffer);
JsonObject& sensor = sensors.createNestedObject();
sensor["type"] = int(magnitude.type);
sensor["value"] = String(buffer);
sensor["units"] = _sensorUnits(magnitude.type);
sensor["description"] = magnitude.sensor->slot(magnitude.local);
sensor["error"] = magnitude.sensor->error();
JsonObject& element = list.createNestedObject();
element["type"] = int(magnitude.type);
element["value"] = String(buffer);
element["units"] = _sensorUnits(magnitude.type);
element["description"] = magnitude.sensor->slot(magnitude.local);
element["error"] = magnitude.sensor->error();
if (magnitude.type == MAGNITUDE_TEMPERATURE) hasTemperature = true; if (magnitude.type == MAGNITUDE_TEMPERATURE) hasTemperature = true;
@ -220,7 +220,8 @@ void _sensorInit() {
#if DALLAS_SUPPORT #if DALLAS_SUPPORT
{ {
DallasSensor * sensor = new DallasSensor(); DallasSensor * sensor = new DallasSensor();
sensor->setGPIO(DALLAS_PIN, DALLAS_PULLUP);
sensor->setGPIO(DALLAS_PIN);
sensor->setPullUp(DALLAS_PULLUP);
_sensorRegister(sensor); _sensorRegister(sensor);
} }
#endif #endif
@ -237,7 +238,8 @@ void _sensorInit() {
#if DIGITAL_SUPPORT #if DIGITAL_SUPPORT
{ {
DigitalSensor * sensor = new DigitalSensor(); DigitalSensor * sensor = new DigitalSensor();
sensor->setGPIO(DIGITAL_PIN, DIGITAL_PIN_MODE);
sensor->setGPIO(DIGITAL_PIN);
sensor->setMode(DIGITAL_PIN_MODE);
sensor->setDefault(DIGITAL_DEFAULT_STATE); sensor->setDefault(DIGITAL_DEFAULT_STATE);
_sensorRegister(sensor); _sensorRegister(sensor);
} }
@ -283,9 +285,10 @@ void _sensorInit() {
#if EVENTS_SUPPORT #if EVENTS_SUPPORT
{ {
EventSensor * sensor = new EventSensor(); EventSensor * sensor = new EventSensor();
sensor->setGPIO(EVENTS_PIN, EVENTS_PIN_MODE);
sensor->setGPIO(EVENTS_PIN);
sensor->setMode(EVENTS_PIN_MODE);
sensor->setDebounceTime(EVENTS_DEBOUNCE); sensor->setDebounceTime(EVENTS_DEBOUNCE);
sensor->setinterruptMode(EVENTS_INTERRUPT_MODE);
sensor->setInterruptMode(EVENTS_INTERRUPT_MODE);
_sensorRegister(sensor); _sensorRegister(sensor);
} }
#endif #endif
@ -293,7 +296,8 @@ void _sensorInit() {
#if MHZ19_SUPPORT #if MHZ19_SUPPORT
{ {
MHZ19Sensor * sensor = new MHZ19Sensor(); MHZ19Sensor * sensor = new MHZ19Sensor();
sensor->setGPIO(MHZ19_RX_PIN, MHZ19_TX_PIN);
sensor->setRX(MHZ19_RX_PIN);
sensor->setTX(MHZ19_TX_PIN);
_sensorRegister(sensor); _sensorRegister(sensor);
} }
#endif #endif
@ -301,7 +305,8 @@ void _sensorInit() {
#if PMSX003_SUPPORT #if PMSX003_SUPPORT
{ {
PMSX003Sensor * sensor = new PMSX003Sensor(); PMSX003Sensor * sensor = new PMSX003Sensor();
sensor->setGPIO(PMS_RX_PIN, PMS_TX_PIN);
sensor->setRX(PMS_RX_PIN);
sensor->setTX(PMS_TX_PIN);
_sensorRegister(sensor); _sensorRegister(sensor);
} }
#endif #endif


+ 6
- 0
code/espurna/sensors/BMX280Sensor.h View File

@ -26,6 +26,12 @@ class BMX280Sensor : public BaseSensor {
_address = address; _address = address;
} }
// ---------------------------------------------------------------------
unsigned char getAddress() {
return _address;
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensor API // Sensor API
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 12
- 0
code/espurna/sensors/DHTSensor.h View File

@ -29,6 +29,8 @@ class DHTSensor : public BaseSensor {
_count = 2; _count = 2;
} }
// ---------------------------------------------------------------------
void setGPIO(unsigned char gpio) { void setGPIO(unsigned char gpio) {
_gpio = gpio; _gpio = gpio;
} }
@ -37,6 +39,16 @@ class DHTSensor : public BaseSensor {
_type = type; _type = type;
} }
// ---------------------------------------------------------------------
unsigned char getGPIO() {
return _gpio;
}
unsigned char getType() {
return _type;
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensor API // Sensor API
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 19
- 4
code/espurna/sensors/DallasSensor.h View File

@ -33,12 +33,26 @@ class DallasSensor : public BaseSensor {
// Public // Public
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
void setGPIO(unsigned char gpio, bool pullup = false) {
if (_gpio != gpio) _dirty = true;
if (_pullup != pullup) _dirty = true;
void setGPIO(unsigned char gpio) {
if (_gpio == gpio) return;
_gpio = gpio; _gpio = gpio;
_dirty = true;
}
void setPullUp(bool pullup) {
if (_pullup == pullup) return;
_pullup = pullup; _pullup = pullup;
_interval = SENSOR_READ_INTERVAL / 2;
_dirty = true;
}
// ---------------------------------------------------------------------
unsigned char getGPIO() {
return _gpio;
}
bool getPullUp() {
return _pullup;
} }
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
@ -50,6 +64,7 @@ class DallasSensor : public BaseSensor {
if (!_dirty) return; if (!_dirty) return;
_dirty = false; _dirty = false;
_interval = SENSOR_READ_INTERVAL / 2;
// OneWire // OneWire
if (_wire) delete _wire; if (_wire) delete _wire;


+ 27
- 2
code/espurna/sensors/DigitalSensor.h View File

@ -20,19 +20,43 @@ class DigitalSensor : public BaseSensor {
_count = 1; _count = 1;
} }
void setGPIO(unsigned char gpio, int mode = INPUT) {
// ---------------------------------------------------------------------
void setGPIO(unsigned char gpio) {
_gpio = gpio; _gpio = gpio;
pinMode(_gpio, mode);
}
void setMode(unsigned char mode) {
_mode = mode;
} }
void setDefault(bool value) { void setDefault(bool value) {
_default = value; _default = value;
} }
// ---------------------------------------------------------------------
unsigned char getGPIO() {
return _gpio;
}
unsigned char getMode() {
return _mode;
}
bool getDefault() {
return _default;
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensor API // Sensor API
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Initialization method, must be idempotent
void begin() {
pinMode(_gpio, _mode);
}
// Descriptive name of the sensor // Descriptive name of the sensor
String name() { String name() {
char buffer[20]; char buffer[20];
@ -69,6 +93,7 @@ class DigitalSensor : public BaseSensor {
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
unsigned char _gpio; unsigned char _gpio;
unsigned char _mode;
bool _default = false; bool _default = false;
}; };

+ 8
- 0
code/espurna/sensors/EmonADC121Sensor.h View File

@ -42,12 +42,20 @@ class EmonADC121Sensor : public EmonAnalogSensor {
init(); init();
} }
// ---------------------------------------------------------------------
void setAddress(unsigned char address) { void setAddress(unsigned char address) {
if (_address == address) return; if (_address == address) return;
_address = address; _address = address;
_dirty = true; _dirty = true;
} }
// ---------------------------------------------------------------------
unsigned char getAddress() {
return _address;
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensor API // Sensor API
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 20
- 0
code/espurna/sensors/EmonADS1X15Sensor.h View File

@ -110,6 +110,8 @@ class EmonADS1X15Sensor : public EmonSensor {
init(); init();
} }
// ---------------------------------------------------------------------
void setAddress(unsigned char address) { void setAddress(unsigned char address) {
if (_address == address) return; if (_address == address) return;
_address = address; _address = address;
@ -134,6 +136,24 @@ class EmonADS1X15Sensor : public EmonSensor {
_dirty = true; _dirty = true;
} }
// ---------------------------------------------------------------------
unsigned char getAddress() {
return _address;
}
unsigned char getType() {
return _type;
}
unsigned char getMask() {
return _mask;
}
unsigned char getGain() {
return _gain;
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensor API // Sensor API
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 28
- 7
code/espurna/sensors/EmonSensor.h View File

@ -31,6 +31,17 @@ class EmonSensor : public BaseSensor {
} }
void expectedPower(unsigned char channel, unsigned int expected) {
if (channel >= _channels) return;
unsigned int actual = _current[channel] * _voltage;
if (actual == 0) return;
if (expected == actual) return;
_current_ratio[channel] = _current_ratio[channel] * (expected / actual);
_dirty = true;
}
// ---------------------------------------------------------------------
void setVoltage(double voltage) { void setVoltage(double voltage) {
if (_voltage == voltage) return; if (_voltage == voltage) return;
_voltage = voltage; _voltage = voltage;
@ -50,13 +61,23 @@ class EmonSensor : public BaseSensor {
_dirty = true; _dirty = true;
} }
void expectedPower(unsigned char channel, unsigned int expected) {
if (channel >= _channels) return;
unsigned int actual = _current[channel] * _voltage;
if (actual == 0) return;
if (expected == actual) return;
_current_ratio[channel] = _current_ratio[channel] * (expected / actual);
_dirty = true;
// ---------------------------------------------------------------------
double getVoltage() {
return _voltage;
}
double getReference() {
return _reference;
}
double getCurrentRatio(unsigned char channel) {
if (channel >= _channels) return 0;
return _current_ratio[channel];
}
unsigned char getChannels() {
return _channels;
} }
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 30
- 5
code/espurna/sensors/EventSensor.h View File

@ -24,19 +24,42 @@ class EventSensor : public BaseSensor {
detachInterrupt(_gpio); detachInterrupt(_gpio);
} }
void setGPIO(unsigned char gpio, int mode = INPUT) {
// ---------------------------------------------------------------------
void setGPIO(unsigned char gpio) {
_gpio = gpio; _gpio = gpio;
pinMode(_gpio, mode);
} }
void setinterruptMode(unsigned long mode) {
void setMode(unsigned char mode) {
_mode = mode; _mode = mode;
} }
void setInterruptMode(unsigned char mode) {
_interrupt_mode = mode;
}
void setDebounceTime(unsigned long debounce) { void setDebounceTime(unsigned long debounce) {
_debounce = debounce; _debounce = debounce;
} }
// ---------------------------------------------------------------------
unsigned char getGPIO() {
return _gpio;
}
unsigned char getMode() {
return _mode;
}
unsigned char getInterruptMode() {
return _interrupt_mode;
}
unsigned long getDebounceTime() {
return _debounce;
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensors API // Sensors API
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
@ -45,7 +68,8 @@ class EventSensor : public BaseSensor {
// Defined outside the class body // Defined outside the class body
void begin() { void begin() {
if (_interrupt_gpio != GPIO_NONE) detach(_interrupt_gpio); if (_interrupt_gpio != GPIO_NONE) detach(_interrupt_gpio);
attach(this, _gpio, _mode);
pinMode(_gpio, _mode);
attach(this, _gpio, _interrupt_mode);
} }
// Descriptive name of the sensor // Descriptive name of the sensor
@ -112,7 +136,8 @@ class EventSensor : public BaseSensor {
volatile unsigned long _events = 0; volatile unsigned long _events = 0;
unsigned long _debounce = EVENTS_DEBOUNCE; unsigned long _debounce = EVENTS_DEBOUNCE;
unsigned char _gpio; unsigned char _gpio;
unsigned char _interrupt_gpio = GPIO_NONE;
unsigned char _mode; unsigned char _mode;
unsigned char _interrupt_mode;
unsigned char _interrupt_gpio = GPIO_NONE;
}; };

+ 18
- 3
code/espurna/sensors/MHZ19Sensor.h View File

@ -33,11 +33,26 @@ class MHZ19Sensor : public BaseSensor {
_count = 1; _count = 1;
} }
void setGPIO(unsigned char pin_rx, unsigned char pin_tx) {
if (_pin_rx != pin_rx) _dirty = true;
if (_pin_tx != pin_tx) _dirty = true;
void setRX(unsigned char pin_rx) {
if (_pin_rx == pin_rx) return;
_pin_rx = pin_rx; _pin_rx = pin_rx;
_dirty = true;
}
void setTX(unsigned char pin_tx) {
if (_pin_tx == pin_tx) return;
_pin_tx = pin_tx; _pin_tx = pin_tx;
_dirty = true;
}
// ---------------------------------------------------------------------
unsigned char getRX() {
return _pin_rx;
}
unsigned char getTX() {
return _pin_tx;
} }
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 18
- 3
code/espurna/sensors/PMSX003Sensor.h View File

@ -24,11 +24,26 @@ class PMSX003Sensor : public BaseSensor {
_count = 3; _count = 3;
} }
void setGPIO(unsigned char pin_rx, unsigned char pin_tx) {
if (_pin_rx != pin_rx) _dirty = true;
if (_pin_tx != pin_tx) _dirty = true;
void setRX(unsigned char pin_rx) {
if (_pin_rx == pin_rx) return;
_pin_rx = pin_rx; _pin_rx = pin_rx;
_dirty = true;
}
void setTX(unsigned char pin_tx) {
if (_pin_tx == pin_tx) return;
_pin_tx = pin_tx; _pin_tx = pin_tx;
_dirty = true;
}
// ---------------------------------------------------------------------
unsigned char getRX() {
return _pin_rx;
}
unsigned char getTX() {
return _pin_tx;
} }
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 6
- 0
code/espurna/sensors/SI7021Sensor.h View File

@ -36,6 +36,12 @@ class SI7021Sensor : public BaseSensor {
_address = address; _address = address;
} }
// ---------------------------------------------------------------------
unsigned char getAddress() {
return _address;
}
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensor API // Sensor API
// --------------------------------------------------------------------- // ---------------------------------------------------------------------


+ 3079
- 3079
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 22
- 22
code/html/custom.js View File

@ -27,7 +27,7 @@ function initMessages() {
messages[10] = "Session expired, please reload page..."; messages[10] = "Session expired, please reload page...";
} }
function sensorType(type) {
function magnitudeType(type) {
var types = [ var types = [
"Temperature", "Humidity", "Pressure", "Temperature", "Humidity", "Pressure",
"Current", "Voltage", "Active Power", "Apparent Power", "Current", "Voltage", "Active Power", "Apparent Power",
@ -39,7 +39,7 @@ function sensorType(type) {
return null; return null;
} }
function sensorError(error) {
function magnitudeError(error) {
var errors = [ var errors = [
"OK", "Out of range", "Warming up", "Timeout", "Wrong ID", "CRC Error" "OK", "Out of range", "Warming up", "Timeout", "Wrong ID", "CRC Error"
]; ];
@ -366,18 +366,18 @@ function createRelayIdxs(data) {
} }
function createSensorIdxs(data) {
function createMagnitudeIdxs(data) {
var current = $("#domoticzSensors > div").length;
var current = $("#domoticzMagnitudes > div").length;
if (current > 0) return; if (current > 0) return;
var template = $("#sensorIdxTemplate .pure-g")[0];
var template = $("#magnitudeIdxTemplate .pure-g")[0];
for (var i=0; i<data.length; i++) { for (var i=0; i<data.length; i++) {
var line = $(template).clone(); var line = $(template).clone();
$("label", line).html(sensorType(data[i].type));
$("label", line).html(magnitudeType(data[i].type));
$("div.hint", line).html(data[i].name); $("div.hint", line).html(data[i].name);
$("input", line).attr("name", "dczSensor" + i).attr("tabindex", 40 + i).val(data[i].idx);
line.appendTo("#domoticzSensors");
$("input", line).attr("name", "dczMagnitude" + i).attr("tabindex", 40 + i).val(data[i].idx);
line.appendTo("#domoticzMagnitudes");
} }
} }
@ -463,23 +463,23 @@ function addRelayGroup() {
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Sensors
// Sensors & Magnitudes
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function initSensors(data) {
function initMagnitudes(data) {
// check if already initialized // check if already initialized
var done = $("#sensors > div").length;
var done = $("#magnitudes > div").length;
if (done > 0) return; if (done > 0) return;
// add templates // add templates
var template = $("#sensorTemplate").children();
var template = $("#magnitudeTemplate").children();
for (var i=0; i<data.length; i++) { for (var i=0; i<data.length; i++) {
var line = $(template).clone(); var line = $(template).clone();
$("label", line).html(sensorType(data[i].type));
$("label", line).html(magnitudeType(data[i].type));
$("div.hint", line).html(data[i].description); $("div.hint", line).html(data[i].description);
$("input", line).attr("data", i); $("input", line).attr("data", i);
line.appendTo("#sensors");
line.appendTo("#magnitudes");
} }
} }
@ -731,19 +731,19 @@ function processData(data) {
} }
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensors
// Sensors & Magnitudes
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
if (key == "sensors") {
initSensors(data[key]);
if (key == "magnitudes") {
initMagnitudes(data[key]);
for (var i=0; i<data[key].length; i++) { for (var i=0; i<data[key].length; i++) {
var element = $("input[name=sensor][data=" + i + "]");
var element = $("input[name=magnitude][data=" + i + "]");
if (element.length) { if (element.length) {
var error = data[key][i].error || 0; var error = data[key][i].error || 0;
if (error == 0) { if (error == 0) {
element.val(data[key][i].value + data[key][i].units); element.val(data[key][i].value + data[key][i].units);
} else { } else {
element.val(sensorError(error));
element.val(magnitudeError(error));
} }
} }
} }
@ -822,9 +822,9 @@ function processData(data) {
return; return;
} }
// Domoticz - Sensors
if (key == "dczSensors") {
createSensorIdxs(data[key]);
// Domoticz - Magnitudes
if (key == "dczMagnitudes") {
createMagnitudeIdxs(data[key]);
return; return;
} }


+ 7
- 7
code/html/index.html View File

@ -168,7 +168,7 @@
<div id="channels"> <div id="channels">
</div> </div>
<div id="sensors">
<div id="magnitudes">
</div> </div>
<div class="pure-g module module-emon module-hlw module-v9261f module-ech1560"> <div class="pure-g module module-emon module-hlw module-v9261f module-ech1560">
@ -789,7 +789,7 @@
<div id="domoticzRelays"></div> <div id="domoticzRelays"></div>
<div id="domoticzSensors"></div>
<div id="domoticzMagnitudes"></div>
<div class="pure-g module module-pwr"> <div class="pure-g module module-pwr">
<label class="pure-u-1 pure-u-sm-1-4">Power IDX</label> <label class="pure-u-1 pure-u-sm-1-4">Power IDX</label>
@ -1081,10 +1081,10 @@
</div> </div>
</div> </div>
<div id="sensorIdxTemplate" class="template">
<div id="magnitudeIdxTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
<label class="pure-u-1 pure-u-sm-1-4">Sensor</label>
<div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczSensor" type="number" min="0" tabindex="0" data="0" /></div>
<label class="pure-u-1 pure-u-sm-1-4">Magnitude</label>
<div class="pure-u-1 pure-u-sm-1-8"><input class="pure-u-sm-23-24" name="dczMagnitude" type="number" min="0" tabindex="0" data="0" /></div>
<div class="pure-u-1 pure-u-sm-5-8 hint center"></div> <div class="pure-u-1 pure-u-sm-5-8 hint center"></div>
</div> </div>
</div> </div>
@ -1117,11 +1117,11 @@
</div> </div>
</div> </div>
<div id="sensorTemplate" class="template">
<div id="magnitudeTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
<label class="pure-u-1 pure-u-sm-1-4"></label> <label class="pure-u-1 pure-u-sm-1-4"></label>
<div class="pure-u-1 pure-u-sm-1-4"> <div class="pure-u-1 pure-u-sm-1-4">
<input class="pure-u-1 pure-u-sm-23-24" type="text" name="sensor" data="256" readonly />
<input class="pure-u-1 pure-u-sm-23-24" type="text" name="magnitude" data="256" readonly />
</div> </div>
<div class="pure-u-1 pure-u-sm-1-2 hint inline"></div> <div class="pure-u-1 pure-u-sm-1-2 hint inline"></div>
</div> </div>


Loading…
Cancel
Save