Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefi committed Aug 17, 2017
1 parent db2720d commit 1382185
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions firmware/controllers/algo/engine.cpp
Expand Up @@ -93,6 +93,10 @@ Engine::Engine(persistent_config_s *config) {
reset();
}

Accelerometer::Accelerometer() {
x = y = z = 0;
}

SensorsState::SensorsState() {
reset();
}
Expand Down
10 changes: 10 additions & 0 deletions firmware/controllers/algo/engine.h
Expand Up @@ -67,6 +67,14 @@ class ThermistorMath {
thermistor_conf_s currentConfig;
};

class Accelerometer {
public:
Accelerometer();
float x; // G value
float y;
float z;
};

class SensorsState {
public:
SensorsState();
Expand All @@ -81,6 +89,8 @@ class SensorsState {
float iat;
float clt;

Accelerometer accelerometer;

float vBatt;
float currentAfr;
/**
Expand Down

0 comments on commit 1382185

Please sign in to comment.