Weeknotes 8

  • Ticks are not time.
  • Its been a week of C++.
    Clearly I don’t know the first thing about C++, Terry has been writing it and I have been setting up the hardware to test his code.
    In short, we have been timing how fast some Opto analog inputs can be scanned and detect a change.
    To do this, we have a relay (digital output) and an analog input that the relay changes.
    So the C++ fires the relay, starts a timer, scans the analog input over and over and when it sees it change, stop the timer and print the value on the console (Im logged into the Opto gear via SSH – PuTTY).
    At first we were getting some crazy times that were all over the shop. They sort of looked good, but with a ton of Opto experience under my belt, I knew they were not right.
    I asked to see the code even though I can’t code, I can sort of follow logic. It all looked good except for one bit, the time function. It was using ticks.
    Cant remember where or when, I but I vaguely remember something about ticks from the past and so I did some Google foo and sure enough, ticks are CPU cycles.
    So if your program is using 80% of the CPU and something is using the other 20%, you are only going to see 80% of ‘time’.
    Bottom line, with C++ you need to use chronos. This means you need to change your compiler a little, but Terry got it sorted and we ended up with some real time values.
    Passed the code to the customer and have not heard back yet, but we are hopeful.

  • Trust your experience and stick up for it.
  • This happen last week and on Deepsea Challenge.
    I know something is either wrong or right, but can’t verbalize clearly enough it in a heated exchange, so I just give up, back down and end up going with something that I just know is not right.
    The annoying thing is that both times I am the one that ends up taking the fall for the other guy.

  • Zeroteir
  • Its a free (for 100 or less devices) VPN.
    Its great for Raspberry Pis.
    You install it on your computer (both ends) and you end up with a tunnel between the two on a non-routable IP. Thus its pretty secure.
    I have been using it a ton this week as we install 2 new Raspberry Pi builds in the UK.
    One for ADSB and one for ACARS.