PhoenixPilot/PhoenixPilot — pull request #154 by solidgoldbomb (2013-01-01 21:58:25+00:00)
Title: I2C Virtual Machine

Note: I have not ported the GUI from the old branch. Some of my changes have likely broken compatibility with it anyway.

Virtual Machine for external I2C devices
* Can run arbitrary programs
* Supports I2C read/write
* Can interact with multiple I2C devices
* VM has PC, CTR, 10 general purpose 32-bit registers
* Supports branching
* VM has 8-bytes of RAM
* VM general purpose registers are visible via the I2CVM UAVO to allow logging

Minimal VM Assembler
* Basically a set of macros that generate byte-code.

Shared API between FC and GCS
* New infrastructure to allow the FC to expose some internal structure to the GCS
* Not a replacement for UAVOs, ONLY allows for shared understanding of the *content* of UAVO fields.
* Directory: shared/api

Generic I2C Sensor Module
* Optional module configured via ModuleSettings
* Selects a program and runs it on the I2C VM
* Can select between a few built-in programs or a single persistent user/GCS configured program (I2CUserProgram UAVO).

Built-in VM programs
* OP Mag/Baro raw sensor read
* Basic Test of VM's store, delay and load (endian), branch and CTR instructions. No I2C.

Misc
* Fixes external I2C on FlyingF3
* ComUsbBridge fix for 100% CPU utilization
* Make GCS USB rawhid more robust in the presence of bus timeouts