Fix metric conversion for energy chart

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Get metric / imperial default from the GUI settings in the car

This means that for most people the graphs should be shown in the correct
system by default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix potential null dereferences

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge pull request #57 from dirkhh/fixes

Fixes metric