sensor_sim: Add documentation and clear up some issues.
The sensor simulator turned somewhat into a mess, largely because of
two reasons:
- Many people disagreeing on what parameters should mean etc.
- No tests to verify the absence of bugs.
This commit aims to fix that by cleaning up some of the code, adding
a bunch of documentation and most importantly by adding a test for
the class.
The `position_sensor_sim.cc' file now contains an explanation along
with an ASCII diagram of what problem the class is meant to solve.
Change-Id: I34d203976ceefead50096ddc0d0fcfef12af6d87
diff --git a/frc971/control_loops/control_loops.gyp b/frc971/control_loops/control_loops.gyp
index 6e882e1..785f1be 100644
--- a/frc971/control_loops/control_loops.gyp
+++ b/frc971/control_loops/control_loops.gyp
@@ -36,6 +36,18 @@
'includes': ['../../aos/build/queues.gypi'],
},
{
+ 'target_name': 'position_sensor_sim_test',
+ 'type': 'executable',
+ 'sources': [
+ 'position_sensor_sim_test.cc',
+ ],
+ 'dependencies': [
+ 'queues',
+ 'position_sensor_sim',
+ '<(EXTERNALS):gtest',
+ ],
+ },
+ {
'target_name': 'position_sensor_sim',
'type': 'static_library',
'sources': [