-
Notifications
You must be signed in to change notification settings - Fork 2
Labels
controlscontrols team workcontrols team work
Description
we have linear potentiometers which measure the displacement of our suspension. This issue will write a driver to convert Voltage inputs (in volts
) to a displacement output (in mm
).
- Create a new folder
lib/sls095
. Copy thelib/lookup_table
structure.- Your code should code in a file called
sls095.hpp
- everything should be in the
macfe::sls095
namespace
- Your code should code in a file called
- Write a function which takes a voltage input and returns position.
- The sensor model is
SLS095 / 0075 / 3K0 / R / 66
- The datasheet is https://www.cw-industrial.com/sites/default/files/home/industrial-sensors/linear-position/SLS095-Technical-Information.pdf (include this link in a comment at the top of your C++ file)
- The sensor model is
- Add a couple tests to the
lib/sls095
folder. Make sure they run and pass when you executepio test
from the folder - Update
lvcontroller/src/suspension
to use the new function. See that file's comment// todo: update the mapping
To use the
lib/sls095
module inprojects/lvcontroller
, you should add a relative symlink insideprojects/lvcontroller/lib
to the module. Use these commandscd projects/lvcontroller/lib ln -s ../../../lib/sls095
Then you should be able to
#include "sls095.hpp"
from anywhere in the LV controller project
Considerations
- avoid using unnamed constants in equations. use c++ constants to give names to constants
- your function signature should clearly express the physical units (for example,
ComputeTime
is a bad name whereasComputeSeconds
explicitly shows the units. this is just an example, your code uses displacement and voltage, not Time)
Metadata
Metadata
Assignees
Labels
controlscontrols team workcontrols team work