diff options
Diffstat (limited to 'error_utils.c')
-rw-r--r-- | error_utils.c | 13 |
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; |