diff --git a/arduino/HalMultiSensor/HalConfiguration.h b/arduino/HalMultiSensor/HalConfiguration.h index 4fbe1342..aaeec5ce 100755 --- a/arduino/HalMultiSensor/HalConfiguration.h +++ b/arduino/HalMultiSensor/HalConfiguration.h @@ -6,7 +6,7 @@ #define TIMER_MILLISECOND 60000 // poling in minutes #define INDICATOR_PIN 13 // diode -#define DEVICE_BASE_ID 20 +#define DEVICE_BASE_ID 98 // POWER CONSUMPTION SENSOR //#define POWERCON_ENABLED // comment out to disable sensor @@ -21,7 +21,7 @@ #define TEMPERATURE_TIMER_MULTIPLIER 10 // LIGHT SENSOR -#define LIGHT_ENABLED // comment out to disable sensor +//#define LIGHT_ENABLED // comment out to disable sensor #define LIGHT_SENSOR SensorBH1750() #define LIGHT_PROTOCOL ProtocolOregon(11, DEVICE_BASE_ID + 3) #define LIGHT_TIMER_MULTIPLIER 10 diff --git a/arduino/HalMultiSensor/Interrupt.cpp b/arduino/HalMultiSensor/Interrupt.cpp index 4389e570..009af7e7 100755 --- a/arduino/HalMultiSensor/Interrupt.cpp +++ b/arduino/HalMultiSensor/Interrupt.cpp @@ -36,13 +36,14 @@ void Interrupt::sleep() sleep_enable(); // enables the sleep bit in the mcucr register // so sleep is possible. just a safety pin - power_adc_disable(); + //power_adc_disable(); //power_spi_disable(); + //power_usart0_disable(); //power_timer0_disable(); //power_timer1_disable(); //power_timer2_disable(); //power_twi_disable(); - //power_all_disable() + //power_all_disable(); while( ! Interrupt::wakeUpNow) { @@ -52,7 +53,7 @@ void Interrupt::sleep() sleep_disable(); // first thing after waking from sleep: // disable sleep... - power_adc_enable(); + //power_adc_enable(); //power_spi_enable(); //power_usart0_enable(); //power_timer0_enable(); diff --git a/hal-default.db b/hal-default.db index f68f708a..cbdd384b 100755 Binary files a/hal-default.db and b/hal-default.db differ diff --git a/resource/web/css/hal.css b/resource/web/css/hal.css index ab56ffac..b34f6adb 100755 --- a/resource/web/css/hal.css +++ b/resource/web/css/hal.css @@ -99,6 +99,10 @@ body { box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12) } +.disabled { + background-color: lightgray; + opacity: .6; +} /* * Placeholder dashboard ideas diff --git a/resource/web/trigger.tmpl b/resource/web/trigger.tmpl index 1b90bda3..b5d77455 100755 --- a/resource/web/trigger.tmpl +++ b/resource/web/trigger.tmpl @@ -13,16 +13,18 @@
-
- -
- -
-
+ {{.getName()}} +
+ +
-
+
@@ -138,9 +140,63 @@ $(function(){ initDynamicModalForm("triggerModal", "trigger-data-conf", "trigger-data-conf-template"); initDynamicModalForm("actionModal", "action-data-conf", "action-data-conf-template"); + + $("#flowModal").on('show.bs.modal', function (event) { + var button = $(event.relatedTarget); + var modal = $(this); + modal.find("input[type=text]").val(""); // Reset all inputs + + modal.find("input[name=flow-id]").val(button.data("flow-id")); + modal.find("input[name=name]").val(button.data("name")); + modal.find("input[name=enabled]").prop('checked', button.data("enabled")); + modal.find("input[name=enabled]").bootstrapSwitch('state', button.data("enabled"), true); + }); }); + +