Project Updates for 4/4/2013

I now have the code that shows the channels times. This is mostly working. Occasionally, a channel time is never requested, so I'm working that out. Anyway, I made quite a few changes to the overall program based on certain problems.

First of all, I was running into the problem of the program occasionally crashing as I worked on new features and as a result, I couldn't look at my log tab. So, I created a function that records it to the system log and outputs it to the log tab at the same time. After that, I was able to see a lot more of what was going on.

When I received data back from the arduino, I was using brackets to delimit the commands and I would receive the data in chunks and I would keep adding it to a buffer and process if it started and began with brackets. That worked fine for sending one command at a time, but when I started receiving multiple responses, I would get it chunked together with 2 or 3 responses sometimes. I added some code to check if the responses were chunked and would call the function to handle the responses and remove pending commands, which effectively turned it into a queue.

I noticed that when I rotated the android, it was losing all of the UI data. This seemed to only happen when going from portrait to landscape and vice versa. I decided to only allow portrait mode (and reverse portrait). I liked the layout for portrait much better than the landscape one I came up with, so I removed all of the landscape stuff. I have a little debugging to do and I need to add the ping sensor data as well as loop the program to get constant updates and this phase should be done.

I did have a good idea yesterday to add a section that I can use to reconfigure the way I want the robot to respond or behave as well as enabling and disabling features dynamically. This would be excellent for robotics competitions with certain rules and would take advantage of using a tablet, since it's so portable.

Posted in Old Posts 04 Apr 2013