Bah- or Mint-Humbug?

It’s been a bit of a “Bah Humbug” few days.

RPIO.PWM needs upgrading to use mailboxes to find the memory mapping from the video cortext to the RPi for Zoe.  I needed to merge the ServoBlaster code into RPIO.PWM which although not hard, was going to need care and time;  the latter of which is hard to find in my house.

The LEDDAR integration worked well, but for some completely unrelated reason, the asynchronous code I use for catching hardware interrupts stopped working – it was only catching the first.  That meant there was no protection mid-flight for a FIFO overflow and the commensurate dodgy data and resultant crash.

And then in the last two hours, today turned into a “Mint Humbug” day.  Mint Humbugs are my favourites sweets; I have two bags of them in the office right now.  What was the source of the turnaround, you may ask?

I realised while cycling back home after buying some beers that I didn’t need the asynchronous callbacks any more; they date from the pre-FIFO era when I needed to know a batch of data was ready. Simply polling the interrupt pins was a better solution.  That’s now implemented and tested passively in my ‘lab’; live testing starts tomorrow.

And while I was finishing this up, I got an email from a friend in China who started building his quad based loosely on my code a few months ago; he got in touch regularly asking advice and I happily gave it.  But a while back the tables turned; today he sent me his latest flight video of 35s of stable hover.  The flights are in an underground concrete car-park, and he’s using LiDAR technology for obstacle avoidance and position stability, and it works beautifully.  Sadly, I don’t think I can share his video due to the Chinese Wall between us.

Shortly after his first e-mail arrived, a second e-mail from him arrived in my inbox containing his mailbox version of the RPIO.PWM code which he uses on his RPi 2 & 3.  I couldn’t believe my luck.  Thank you so much Reik Hua!

And to finish the day off, I’ve subscribed to another 6 months of the MagPi magazine, which means I have another free Pi Zero plus camera cable on the way.

Now, where is that bag of mint humbugs – it’s time to celebrate!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.