Skip to content

Commit

Permalink
Bugfix and added sensor conversions for accelerator and gyro.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxha651 committed May 23, 2015
1 parent 6dfdb9c commit 35f2ca7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions server/yamsLogd/config-files/sensor_definitions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,16 @@ obdiielm,throttlepos, , ,9
%% ----------------------------------------------------------------------
%% ID = 1337

% (x>32767?x-65536:x) <-- conversion if sent as signed

erlogger,time_high, , ,0
erlogger,time_low, , ,1
erlogger,acc_x, , ,2
erlogger,acc_y, , ,3
erlogger,acc_z, , ,4
erlogger,gyro_x, , ,5
erlogger,gyro_y, , ,6
erlogger,gyro_z, , ,7
erlogger,acc_x, , ,2,(x>32767?x-65536:x)/16384
erlogger,acc_y, , ,3,(x>32767?x-65536:x)/16384
erlogger,acc_z, , ,4,(x>32767?x-65536:x)/16384
erlogger,gyro_x, , ,5,(x>32767?x-65536:x)/131
erlogger,gyro_y, , ,6,(x>32767?x-65536:x)/131
erlogger,gyro_z, , ,7,(x>32767?x-65536:x)/131
erlogger,damper_fl, , ,8
erlogger,damper_fr, , ,9
erlogger,damper_bl, , ,10
Expand Down
2 changes: 1 addition & 1 deletion server/yamsLogd/src/sensors/ERDataLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ bool ERDataLogger::read_one_data(std::vector<float>* values){
else {
second_byte = true;
}
last_byte = byte;
}
last_byte = byte;
}
#if (ER_DATALOGGER_DEBUG)
std::cout << "ERDataLogger: Too large packet or no stop byte" << std::endl;
Expand Down

0 comments on commit 35f2ca7

Please sign in to comment.