summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:07:47 +0900
committerroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:07:47 +0900
commit08549242c7064efadde0801d9c6482fa64ec3db9 (patch)
tree9268544e7053a3494193ec6be902f0d87e3f75a2 /device-functions.c
parente546fa3d55f199e1810b1ad724beeb8f8b9747ba (diff)
handle default delay better for CH2 of 2CHPP
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/device-functions.c b/device-functions.c
index 44b2ff2..9275df7 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -81,7 +81,14 @@ void Main_Rst (void)
globals.ChannelState[i].route_primary=1;
globals.ChannelState[i].route_secondary=1;
globals.ChannelState[i].frequency=globals.Flash.min_freq[i];
- globals.ChannelState[i].delay=globals.Flash.min_delay[i];
+
+ if (globals.Flash.min_delay[i] > 0.0) {
+ globals.ChannelState[i].delay=globals.Flash.min_delay[i];
+ } else if (globals.Flash.max_delay[i] < 0.0) {
+ globals.ChannelState[i].delay=globals.Flash.max_delay[i];
+ } else {
+ globals.ChannelState[i].delay=0.0;
+ }
if (globals.Flash.min_pw[i] > 0.0) {
globals.ChannelState[i].pw=globals.Flash.min_pw[i];