Msqur Update v0.53b

I’ve rolled out the update 0.53b to msqur.com. This includes:

  • INI Parsing (i.e. better MSQ support)
  • Bug fixes and better error handling

So now it is a bit more usable. The INI Parsing turns out to be a bit more complex than I anticipated, but I rolled out a decent intermediate update in the meantime.

Before completing the INI parsing (or anything else for that matter), I’ve decided to overhaul the entire codebase. This is because I wrote the first version off the cuff, but I’ve been receiving a few feature requests and it’s turned into something that merits proper design considerations. So, I’ll be adding a much needed OO and configuration revamp to it.

Carduino 2.0 – Intel Galileo Setup

Out of the box the Galileo is setup to run sketches uploaded from volatile memory, which is really lame. I didn’t spend much time with it using the stock SPI kernel. So, an SD card is pretty much required to do any serious development with this board. This is not a bad thing (although you aren’t running in real-time anymore), since having a full OS to use has lots of advantages. Plus, this way I can automate the build process in a way I’m more familiar with. Continue reading

Carduino 2.0

Over a year ago I got an Arduino Uno and a CAN-BUS Shield to try and make some kind of datalogger for my car. I was also interested in using the OpenXC library with it (which might need a port if there isn’t one already, since it uses the Digilent chipKIT Max32 development board). While OpenXC allows interfacing with Android stuff for phones, I’m more interested in a self-contained datalogging type deal. Connecting a phone to review/control things would be a plus, but not required. Mainly, it would record to an SD card for later manipulation on any platform.

The problem with the Uno was that it has limited flash storage space, 32KB total. Lots of strings (for LCD output) in my source combined with some poorly written C++ CAN-BUS/SD/GPS libraries that SK PANG provide with the CAN-BUS shield, and the compiled output is just too large. The libraries are a hodge-podge of various OSS projects. I intend to rewrite them in C. You can run the binaries off the SD Card, but that’s not what I wanted the SD Card for.

Carduino 2.0

So, I just got a Arduino Galileo, which is way overkill. It was either get a Arduino Mega, which has enough flash but is otherwise relatively the same (and likely going to be obsolete soon), or get the Galileo. Instead of Atmega powered, it has a real Intel x86 SoC and runs Linux! No more AVR cross-compiling. And since it is Arduino Uno “shield compatible”, I don’t have to worry about the shield not working (I think! I’m assuming the shield follows the Uno spec.).

8MB Flash, 400MHz clock speed and a whole other bunch of superior specs I don’t remember. Now, the embedded Linux kernel is on that 8MB, and takes most of it up. So at first it looked like I was in the same boat. However, it has a built-in SD card slot that you can load up another, larger, image onto. Now I have two SD Card slots, one on board and one on the CAN-BUS shield. One for the OS, one for logging data. Perfect.

First I have to get familiar with the Galileo and setup the environment. After that I can start developing. So this will be split up into at least two other parts.

Custom Speed app update

I update Custom Speed to 1.1. Changes include:

  • An actual theme (consistent colors)
  • More units
  • New icon

2.0 will include an actual settings page that will allow the units to be selected from an easier control, a setting for keeping the display on, and other minor UI improvements. There’s no ETA currently for 2.0.

Refactoring with regular expressions

I’m re-learning JavaScript, and I noticed I was refactoring functions a lot on some old code. I’m putting some useful stuff here for reference:

aFunc(blah) → this.aFunc = function(blah)

Find: function (\w+)\(

Replace with: this.\1 = function\(

 

To go the other way:

Find: \t(\w+)\s=\sfunction\(

Replace with: \tfunction \1\(

 

Change aFunc(blah) to SOME.qualifier.aFunc(blah)

Find: \t(\w+\()

Replace with: \tSOME.qualifier.\1