trunet Posted July 22, 2014 Report Share Posted July 22, 2014 My code has:pe = geventEventWait(&gl, MS2ST(500));on the infinite loop inside a thread.after last commit it's not returning after 500ms but immediately. Link to comment Share on other sites More sharing options...
inmarket Posted July 22, 2014 Report Share Posted July 22, 2014 If you want after 500ms the 2nd parameter should 500 not MS2ST(500) as geventEventWait takes milliseconds as the 2nd parameter.Try that change first and let us know if that works. I know there were bugs around that area in the old code. If the new code does not work after the above change let us know and I will do some tests. Link to comment Share on other sites More sharing options...
trunet Posted July 22, 2014 Author Report Share Posted July 22, 2014 If you want after 500ms the 2nd parameter should 500 not MS2ST(500) as geventEventWait takes milliseconds as the 2nd parameter.I don't think geventEventWait should take milliseconds as second parameter. A better approach would be to use chibios convention and use this MS2ST among others helper functions to wait certain things.BTW, I made the suggested test and it keeps returning immediately:pe = geventEventWait(&gl, 500); Link to comment Share on other sites More sharing options...
inmarket Posted July 23, 2014 Report Share Posted July 23, 2014 All timing functions in ugfx use real time milliseconds or microseconds. This is because ugfx is designed to be operating system neutral. MS2ST is a chibios specific call.Some operating systems don't even have the concept of a "tick". Even chibios V3 is "tickless" with ticks only being maintained as a optional scheduler quantum and for V2 compatibility.I will run some tests over the next few days to see why geventEventWait might be returning early. Link to comment Share on other sites More sharing options...
inmarket Posted August 16, 2014 Report Share Posted August 16, 2014 This bug has been found and now fixed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now