summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:30:33 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:30:33 +0900
commitbdd26361af532467dd5925252ac16e7a5e56ea18 (patch)
treed8d1ab046b673654354b61fc032f5dc7a861bf2c /device-functions.c
parentcbf145bf9e2e45df429abbac691be33f60e57c39 (diff)
let rise time go to the lowest hardware-possible value, not just the specified minimum - for AVRQINSTRUMENT_6_4_19c
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c
index de954fd..81bf1d9 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -2680,6 +2680,34 @@ static int inverse_interpolation (int x1, int x2, float y1, float y2, float y_ne
}
+float min_possible_hw_rise_time (int channel, float use_ampl)
+{
+ // special function to let rise time go to the lowest hardware-possible value, not just the specified minimum - for AVRQ
+ float min_so_far, try_this;
+
+ int i, j, actual_pol;
+
+ if (use_ampl<0.0) {
+ actual_pol=1;
+ } else {
+ actual_pol=0;
+ }
+
+ min_so_far = globals.Flash.max_rise_time[channel];
+
+ for (i=0;i<ampl_ranges;i++) {
+ for (j=0;j<std_range_size;j++) {
+ try_this = globals.Flash.rise_time_pwl[channel][i][actual_pol][j];
+ if ((try_this > 0.0) && (try_this < min_so_far)) {
+ min_so_far = try_this;
+ }
+ }
+ }
+
+ return min_so_far;
+}
+
+
int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int *relay_range,int *atten_range,
int *UseNegData,int *entry,int *word_out,int *actual_pol,int *word_out_aux)
{