erget/UltraPilot — pull request #5 by erget (2013-12-06 13:21:55+00:00)
Title: Rewrite sensor model

The most major things that have been changed are:

- Abstract sensor classes are used for sharing interfaces with the real world
- Smart pointers are used rather than builtins

The abstract classes remove the need for the ``VibrationScalers``, which are now deprecated and will be removed in the near future. ``Sensors`` decide what alert level they pass on to their ``Rangefinder``, and thus far the ``Rangefinder`` accepts that and passes it on to the ``VibratorMotors``. Because this means that every sensor - whether ultrasonic or not - shares a common interface that is exposed to a ``Rangefinder``, they are now combined. Additionally, because the ``Sensors`` now decide their alert level, I've made a class for ground obstacle detection. This class shares the same driver as the original ultrasonic rangefinder used in the UltraPilot Mark 1. This makes it possible, in the future, to have a sensor devoted to ground-based obstacle detection.