diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:02:02 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:02:02 +0900 |
commit | b9aed70d02c6daa5bac9a9aa5f67c6c8c94358e0 (patch) | |
tree | 2fd1bc6e02877057f8341e85c1a10a480b94fe75 /device-functions.c | |
parent | a95b1e0197bcd35c6a45a4c18f5a5fbe7cd4365c (diff) |
account for min/max fixed amplitudes in error checker
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c index 1d27a3a..e1ec380 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4992,3 +4992,20 @@ gboolean fixed_ampl_ok (int channel, float use_ampl) { } return FALSE; } + + +void get_min_max_fixed_ampls (int channel, float *min_ampl, float *max_ampl) { + int i,max; + max = number_of_fixed_ampl_points(channel); + + *min_ampl = 1e9; + *max_ampl = -1e9; + + for (i=0; i<max; i++) { + float use_ampl; + use_ampl = globals.Flash.fixed_ampl_points[channel][i]; + + if (use_ampl > *max_ampl) *max_ampl = use_ampl; + if (use_ampl < *min_ampl) *min_ampl = use_ampl; + } +} |