summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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];