Jump to content

Last commit made geventEventWait returning immediately


trunet

Recommended Posts

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

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

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

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...