Revision: 1173
Author: jsuijs
Date: Thu Aug 6 13:03:39 2009
Log: new delay bugfix
http://code.google.com/p/jallib/source/detail?r=1173
Modified:
/trunk/include/jal/delay.jal
=======================================
--- /trunk/include/jal/delay.jal Thu Aug 6 09:41:44 2009
+++ /trunk/include/jal/delay.jal Thu Aug 6 13:03:39 2009
@@ -84,13 +84,13 @@
return
elsif n==1 then
const _ten_us_delay1 = 10 - ((17 * instruction_time) / 100)
- if (_ten_us_delay1 < 10) then
+ if (_ten_us_delay1 <= 10) then
_usec_delay(_ten_us_delay1)
end if
else
n = n - 1;
const _ten_us_delay2 = 10 - ((24 * instruction_time) / 100)
- if (_ten_us_delay2 < 10) then
+ if (_ten_us_delay2 <= 10) then
_usec_delay(_ten_us_delay2)
else
_usec_delay(1)
@@ -98,7 +98,7 @@
const _ten_us_delay3 = 10 - ((6 * instruction_time) / 100)
for n loop
- if (_ten_us_delay3 < 10) then
+ if (_ten_us_delay3 <= 10) then
_usec_delay(_ten_us_delay3)
else
_usec_delay(1)
@@ -112,7 +112,7 @@
procedure delay_1ms(word in n) is
const _one_ms_delay = 1000 - ((14 * instruction_time) / 100)
for n loop
- if (_one_ms_delay < 1000) then
+ if (_one_ms_delay <= 1000) then
_usec_delay(_one_ms_delay)
else
_usec_delay(1)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---