platisd/smartcar_shield

Use composition instead of inheritance for Odometer classes

Opened this issue · 0 comments

Description

Currently DirectionalOdometer is extending DirectionlessOdometer so to utilize some common functionality. However, a DirectionalOdometer is not a DirectionlessOdometer. Both are Odometers that are using an Encoder.

Definition of Done

DirectionalOdometer is no more inheriting from a concrete class and there's little to no code duplication.