summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:35:22 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:35:22 +0900
commit6dd6772dc72dde0e1412ace800931c1117eadbba (patch)
tree45f73ad161570a422cef1e6dd22d4487a4b24efb
parent8347c2fdacd9868c793bdc1bc9a2ac5c9ffc166e (diff)
added ability to increase output-on delay
-rw-r--r--device-functions.c3
-rw-r--r--flash.c2
-rw-r--r--globals.h6
3 files changed, 9 insertions, 2 deletions
diff --git a/device-functions.c b/device-functions.c
index ccedec6..2565a02 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -1142,7 +1142,8 @@ int Set_Output_State(int channel,int mode)
bus_setpin(OUTPUT_RELAY, 1); /* turn output on */
bus_setpin(PW_ENABLE, 1); /* enable PW circuit */
- g_usleep (800e3); /* wait for extended-off circuit to work */
+ gulong sleep_us = get_float_with_min (globals.Flash.output_on_delay, DEFAULT_OUTPUT_ON_DELAY) * 1e6;
+ g_usleep (sleep_us); /* wait for extended-off circuit to work */
globals.Timers.last_activity_at[channel] = sec_timer();
} else {
diff --git a/flash.c b/flash.c
index 21bfa79..92a5370 100644
--- a/flash.c
+++ b/flash.c
@@ -477,6 +477,8 @@ static void initFlashValues(FlashStruct *mem)
mem->ampl_ranges_for_ch2_only=0;
+ mem->output_on_delay=DEFAULT_OUTPUT_ON_DELAY; // 0.8 seconds
+
mem->ChanKey_frequency=0;
mem->ChanKey_delay=0;
mem->ChanKey_pw=0;
diff --git a/globals.h b/globals.h
index 44f2561..6645967 100644
--- a/globals.h
+++ b/globals.h
@@ -228,6 +228,10 @@
#define COUNTER_BYTE_3 0x60
+// hardware default values
+#define DEFAULT_OUTPUT_ON_DELAY 0.8 // needs at least 800 ms, due to soft-on circuit
+
+
// menu stuff
#define Main_Menu_On 0
#define Submenu_On 1
@@ -403,7 +407,7 @@ typedef struct {
short telnet_logon_timeout; /* 164 - timeout in seconds */
short spare6; /* 166 */
- float spare5; /* 168 */
+ float output_on_delay; /* 168 */
short channels; /* 172 */
char ChanKey_frequency; /* 174 */