From e61288ff7f0a705ce9c7f60b33429f92f3bfb573 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 1 Jan 2000 00:40:09 +0900 Subject: add cap_for_pw_rc_limit for AVR-8F-B --- error_utils.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'error_utils.c') diff --git a/error_utils.c b/error_utils.c index 24bcd86..cc056c8 100644 --- a/error_utils.c +++ b/error_utils.c @@ -330,6 +330,10 @@ void get_error_text(gchar **response, int error_num) format_error_text(response,-222,"PW too high."); break; + case pw_rc_limit: + format_error_text(response,-222,"PW exceeds RC limit."); + break; + case max_rise_time_error: format_error_text(response,-222,"Rise time too high."); break; @@ -960,6 +964,15 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) report_error=pw_upper_limit; } + // RC limit, as per AVR-8F-B + temp = globals.Flash.cap_for_pw_rc_limit[i] * ChannelStateToTest[i].load_type; + if ((temp > 0.0) && (temp(1.001*globals.Constraints.err_max_pw[i])) { + report_error=pw_rc_limit; + } + } + if (ChannelStateToTest[i].double_pulse==double_on) { temp = (ChannelStateToTest[i].delay - globals.Flash.double_pulse_extra_deadtime[i]) / (1.0 + globals.Flash.double_pulse_extra_pw_margin[i]); if (temp 0.0) { + temp = ChannelStateToTest[i].pw / globals.Flash.cap_for_pw_rc_limit[i]; + if (temp > globals.Constraints.err_min_load_type[i]) { + globals.Constraints.err_min_load_type[i] = temp; + if (ChannelStateToTest[i].load_type<(0.999*globals.Constraints.err_min_load_type[i])) { + report_error=pw_rc_limit; + } + } + } + if (globals.Flash.max_peak_power[i] > 0.0) { temp = ChannelStateToTest[i].amplitude * ChannelStateToTest[i].amplitude / globals.Flash.max_peak_power[i]; if (temp > globals.Constraints.err_min_load_type[i]) { -- cgit