locked
Inconsistent results RRS feed

  • Question

  • I am just starting to play with VPL and am getting some strange results. When I did the "increment a value" tutorial, quite often when running it will miss out one of the numbers, then say it at the end after "all done". It does this randomly with different numbers.

    I'm also having issues with the Drive by Wire tutorial - sometimes when I run it, left and right won't work but back and forwards do. I can stop the program, then start it again straight away and it will all work ok.

    Obviously I can't even think about writing my own programs if it's going to behave like this, and I'm looking at going back to Bricx - but I would like to give this a serious shot first. Does anyone have any idea's why this could be happening?
    Tuesday, November 11, 2008 11:00 PM

Answers

  • Thanks Trevor

    I think the Drive By Wire problem is a bluetooth issue, it was late and I was tired when I initially experienced it (I got sucked in) - I'll do some more testing tonight to double check. I had not modified the code in any way from the tutorial.

    Surely the looping issue is a major problem? From what I experienced it is happening more often than not - even with just a count to 10. Does this only happen when the action on each iteration is slow and causes a delay?
    • Marked as answer by Trevor Taylor Wednesday, December 31, 2008 10:53 PM
    Wednesday, November 12, 2008 7:59 AM

All replies

  • The issue with a loop and the numbers being out of order is due to the fact that a CCR/DSS environment is inherently multi-tasking. What happens is that the code runs around the loop quite fast and potentially using different threads, so sometimes the messages will end up being out of order. This issue is discussed by Kyle in our book about RDS.

     

    As for the Drive By Wire, I don't know what is going on. I have not seen this behavior. The buttons are all on a Windows Form and it does not make sense for one button to fire and another one not to. This is certainly not the intended behavior, so there must be something else going on. Are you just running the tutorial as supplied?

     

    Trevor

     

     

     

    Wednesday, November 12, 2008 4:14 AM
  • Thanks Trevor

    I think the Drive By Wire problem is a bluetooth issue, it was late and I was tired when I initially experienced it (I got sucked in) - I'll do some more testing tonight to double check. I had not modified the code in any way from the tutorial.

    Surely the looping issue is a major problem? From what I experienced it is happening more often than not - even with just a count to 10. Does this only happen when the action on each iteration is slow and causes a delay?
    • Marked as answer by Trevor Taylor Wednesday, December 31, 2008 10:53 PM
    Wednesday, November 12, 2008 7:59 AM
  • Please let us know if you still have trouble with the Drive By Wire.

     

    As for the looping, it is a consequence of a multi-threaded environment that is not necessarily apparent at first. As you have figured out, it is worse if there is a slow action in the loop. This is something we might need to explain better.

     

    Trevor

     

     

    Thursday, November 13, 2008 1:26 AM