Sha256: ae98b8821dbd923eedcc1b3df3798a4164add1caa8e1cfe677440dc3838244c5

Contents?: true

Size: 647 Bytes

Versions: 2

Compression:

Stored size: 647 Bytes

Contents

(function (exports) {

    var device_model_simulation = {

    	temperature: 25.3,
        pressure: 1013.3,
        humidity: 50,
        lux: 200

    };

    exports.init = function (eventbus) {


    	setInterval(function () {

            eventbus.emit('ui.update', {
                    "component": "all",
                    "model": device_model_simulation
                });

            eventbus.emit('device.snapshot', device_model_simulation);


        }, 1000);

        eventbus.emit("serial.simulation");
        eventbus.emit("serial.portopened");


    };

})(typeof exports == 'undefined' ? this['simulator'] = {} : exports);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dial_a_device_node-0.0.154 app/assets/javascripts/dial_a_device_node/devices/weathercape_SIM.js
dial_a_device_node-0.0.153 app/assets/javascripts/dial_a_device_node/devices/weathercape_SIM.js