From 03a4775eefeeba913f69d331e3930700a567c4c5 Mon Sep 17 00:00:00 2001 From: Corentin Le Gall Date: Thu, 14 Nov 2019 19:13:25 +0100 Subject: can: Add big endian CAN frame layout handle - can-decoder.cpp: translate_signal() : Tests "frame_layout_is_little". If false the signal's bit position is changed to fit the layout. - message-definition.cpp: Added the new attribute "frame_layout_is_little" and its getter. - signals.cpp: Added a setter to the bit_position attribute. - converter.cpp: Added a methode to convert a big endian bit_position to a right (little endian) bit_position. Bug-AGL: SPEC-2988 Change-Id: I004c9069eb00f389564927cd12d1b30470c3a59d Signed-off-by: Corentin Le Gall Signed-off-by: Romain Forlot --- plugins/agl-signals.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/agl-signals.cpp b/plugins/agl-signals.cpp index 28a8cce3..e02b61ff 100644 --- a/plugins/agl-signals.cpp +++ b/plugins/agl-signals.cpp @@ -12,7 +12,7 @@ CTLP_LUA_REGISTER("TO-EDIT"); std::shared_ptr message_set = std::make_shared(message_set_t{0,"AGL Virtual Car", { // beginning message_definition_ vector - {std::make_shared(message_definition_t{"ls", 0x30,"", 0, false, frequency_clock_t(5.00000f), true, + {std::make_shared(message_definition_t{"ls", 0x30,"", 0, 0 ,false, frequency_clock_t(5.00000f), true, { // beginning signals vector {std::make_shared (signal_t{ "hvac.fan.speed",// generic_name @@ -104,7 +104,7 @@ std::shared_ptr message_set = })} } // end signals vector })} // end message_definition entry -, {std::make_shared(message_definition_t{"hs", 0x3D9,"", 0, true, frequency_clock_t(5.00000f), true, +, {std::make_shared(message_definition_t{"hs", 0x3D9,"", 0, 0, true, frequency_clock_t(5.00000f), true, { // beginning signals vector {std::make_shared (signal_t{ "engine.speed",// generic_name @@ -174,7 +174,7 @@ std::shared_ptr message_set = })} } // end signals vector })} // end message_definition entry -, {std::make_shared(message_definition_t{"hs", 0x3E9,"", 0, false, frequency_clock_t(5.00000f), true, +, {std::make_shared(message_definition_t{"hs", 0x3E9,"", 0, 0,false, frequency_clock_t(5.00000f), true, { // beginning signals vector {std::make_shared (signal_t{ "vehicle.average.speed",// generic_name @@ -200,7 +200,7 @@ std::shared_ptr message_set = })} } // end signals vector })} // end message_definition entry -, {std::make_shared(message_definition_t{"hs", 0x4D1,"", 0, false, frequency_clock_t(5.00000f), true, +, {std::make_shared(message_definition_t{"hs", 0x4D1,"", 0, 0, false, frequency_clock_t(5.00000f), true, { // beginning signals vector {std::make_shared (signal_t{ "engine.oil.temp",// generic_name @@ -248,7 +248,7 @@ std::shared_ptr message_set = })} } // end signals vector })} // end message_definition entry -, {std::make_shared(message_definition_t{"hs", 0x620,"", 0, false, frequency_clock_t(5.00000f), true, +, {std::make_shared(message_definition_t{"hs", 0x620,"", 0, 0, false, frequency_clock_t(5.00000f), true, { // beginning signals vector {std::make_shared (signal_t{ "doors.boot.open",// generic_name @@ -362,7 +362,7 @@ std::shared_ptr message_set = })} } // end signals vector })} // end message_definition entry -, {std::make_shared(message_definition_t{"hs", 0x799,"", 0, false, frequency_clock_t(5.00000f), true, +, {std::make_shared(message_definition_t{"hs", 0x799,"", 0, 0, false, frequency_clock_t(5.00000f), true, { // beginning signals vector {std::make_shared (signal_t{ "windows.front_left.open",// generic_name -- cgit 1.2.3-korg