summaryrefslogtreecommitdiff
path: root/error_utils.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:15:27 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:15:27 +0900
commitd6b3b66cfd5266be9f20dd17f9c21082b83a4357 (patch)
tree7d7b9e5ee373da7020cd858520ac650a1df5b817 /error_utils.c
parent44173fa9f95362d6de4f65a86e6b4c2b864dd49c (diff)
added a 100 ns minimum dead time requirement
Diffstat (limited to 'error_utils.c')
-rw-r--r--error_utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/error_utils.c b/error_utils.c
index 713fe0a..9dd45b0 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -571,6 +571,10 @@ void get_error_text(gchar **response, int error_num)
format_error_text(response,-222,"Burst width can not exceed period.");
break;
+ case Dead_Time_Error:
+ format_error_text(response,-222,"Insufficient time between end of one pulse and start of next.");
+ break;
+
case password_change_error:
format_error_text(response,-222,"Incorrect old password, or new password is too long or short. ");
break;
@@ -979,6 +983,15 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
if (ChannelStateToTest[i].trigger_source==source_internal) {
+
+ temp=(1/ChannelStateToTest[i].frequency) - globals.Flash.dead_time[i];
+ if (temp<globals.Constraints.err_max_pw[i]) {
+ globals.Constraints.err_max_pw[i]=temp;
+ if (ChannelStateToTest[i].pw>(1.001*globals.Constraints.err_max_pw[i])) {
+ report_error=Dead_Time_Error;
+ }
+ }
+
temp=1/ChannelStateToTest[i].frequency;
if (temp<globals.Constraints.err_max_pw[i]) {
globals.Constraints.err_max_pw[i]=temp;