From 8ba287206d45cb534c632d600c83c11c0ff55ff6 Mon Sep 17 00:00:00 2001 From: evanlivingston Date: Tue, 21 Aug 2018 15:20:29 -0700 Subject: [PATCH 1/6] reduce BREAK_PEDAL_OVERRIDE_THRESHOLD --- api/include/vehicles/kia_niro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/include/vehicles/kia_niro.h b/api/include/vehicles/kia_niro.h index c73ba1d5..d29aac16 100644 --- a/api/include/vehicles/kia_niro.h +++ b/api/include/vehicles/kia_niro.h @@ -242,7 +242,7 @@ typedef struct * @brief Value of the accelerator position that indicates operator override. [steps] * */ -#define BRAKE_PEDAL_OVERRIDE_THRESHOLD ( 200 ) +#define BRAKE_PEDAL_OVERRIDE_THRESHOLD ( 130 ) /* * @brief Minimum value of the high spoof signal that activates the brake lights. [steps] From 0a60389b0f1aad35e036a9586c595c264f3bfe28 Mon Sep 17 00:00:00 2001 From: Robert Brown Date: Tue, 21 Aug 2018 15:33:11 -0700 Subject: [PATCH 2/6] Fix jenkins workspace cleanup Prior to this commit some builds would fail trying to clean up the workspace directory. This commit fixes that by removing the inner cleanup since the try block for the parallel builds should catch any errors from workspace builds. --- Jenkinsfile | 69 +++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e05c7292..221c543d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,50 +17,45 @@ node { def platform = platforms[platform_idx] builds[platform] = { node { - try { - checkout scm - - image = docker.build("cmake-build:${env.BUILD_ID}") + checkout scm - stage("Build ${platform}") { - image.inside { - sh "cd firmware && \ - rm -rf build_${platform} && \ - mkdir build_${platform} && \ - cd build_${platform} && \ - cmake -DVEHICLE=${platform} -DCMAKE_BUILD_TYPE=Release .. && \ - make" + image = docker.build("cmake-build:${env.BUILD_ID}") - echo "${platform}: Build Complete!" - } - } + stage("Build ${platform}") { + image.inside { + sh "cd firmware && \ + rm -rf build_${platform} && \ + mkdir build_${platform} && \ + cd build_${platform} && \ + cmake -DVEHICLE=${platform} -DCMAKE_BUILD_TYPE=Release .. && \ + make" - stage("Test ${platform} unit tests") { - image.inside { - sh "cd firmware && \ - rm -rf build_${platform}_tests && \ - mkdir build_${platform}_tests && \ - cd build_${platform}_tests && \ - cmake -DVEHICLE=${platform} \ - -DTESTS=ON \ - -DPORT_SUFFIX=${EXECUTOR_NUMBER}${platform_idx} \ - -DCMAKE_BUILD_TYPE=Release \ - .. && \ - make run-unit-tests" - echo "${platform}: Unit Tests Complete!" - } + echo "${platform}: Build Complete!" } + } - stage("Test ${platform} property-based tests") { - image.inside("--user root:root") { - sh "cd firmware/build_${platform}_tests && \ - make run-property-tests" - echo "${platform}: Property-Based Tests Complete!" - } + stage("Test ${platform} unit tests") { + image.inside { + sh "cd firmware && \ + rm -rf build_${platform}_tests && \ + mkdir build_${platform}_tests && \ + cd build_${platform}_tests && \ + cmake -DVEHICLE=${platform} \ + -DTESTS=ON \ + -DPORT_SUFFIX=${EXECUTOR_NUMBER}${platform_idx} \ + -DCMAKE_BUILD_TYPE=Release \ + .. && \ + make run-unit-tests" + echo "${platform}: Unit Tests Complete!" } } - finally { - deleteDir() + + stage("Test ${platform} property-based tests") { + image.inside("--user root:root") { + sh "cd firmware/build_${platform}_tests && \ + make run-property-tests" + echo "${platform}: Property-Based Tests Complete!" + } } } } From f8e6ad2feee351120f56f13eaacca9ba031952e6 Mon Sep 17 00:00:00 2001 From: Boris Bidault Date: Mon, 10 Sep 2018 17:01:59 -0700 Subject: [PATCH 3/6] add throttle & speed to obd filters --- firmware/can_gateway/src/communications.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/can_gateway/src/communications.cpp b/firmware/can_gateway/src/communications.cpp index 8589e128..a80a294a 100644 --- a/firmware/can_gateway/src/communications.cpp +++ b/firmware/can_gateway/src/communications.cpp @@ -49,7 +49,9 @@ void republish_obd_frames_to_control_can_bus( void ) { if( (rx_frame.id == KIA_SOUL_OBD_STEERING_WHEEL_ANGLE_CAN_ID) || (rx_frame.id == KIA_SOUL_OBD_WHEEL_SPEED_CAN_ID) - || (rx_frame.id == KIA_SOUL_OBD_BRAKE_PRESSURE_CAN_ID) ) + || (rx_frame.id == KIA_SOUL_OBD_BRAKE_PRESSURE_CAN_ID) + || (rx_frame.id == KIA_SOUL_OBD_THROTTLE_PRESSURE_CAN_ID) + || (rx_frame.id == KIA_SOUL_OBD_SPEED_CAN_ID) ) { cli(); g_control_can.sendMsgBuf( From fcfe5f73adae079f4f4883c67b71a591a39cc796 Mon Sep 17 00:00:00 2001 From: Boris Bidault Date: Wed, 19 Sep 2018 13:50:55 -0700 Subject: [PATCH 4/6] correct comment --- api/include/vehicles/kia_niro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/include/vehicles/kia_niro.h b/api/include/vehicles/kia_niro.h index d29aac16..9fce660a 100644 --- a/api/include/vehicles/kia_niro.h +++ b/api/include/vehicles/kia_niro.h @@ -239,7 +239,7 @@ typedef struct BRAKE_SPOOF_HIGH_SIGNAL_VOLTAGE_MIN ) /* - * @brief Value of the accelerator position that indicates operator override. [steps] + * @brief Value of the brake position that indicates operator override. [steps] * */ #define BRAKE_PEDAL_OVERRIDE_THRESHOLD ( 130 ) From e82ac406a796c2df425a132d74c69cce199fdf5a Mon Sep 17 00:00:00 2001 From: Chris Otos Date: Mon, 24 Sep 2018 17:19:44 -0700 Subject: [PATCH 5/6] Throttle operator override not being published Prior to thie commit the signal, "throttle_operator_override" in the message, "THROTTLE_REPORT(0x93)" did not report a status of driver's throttle override, whereas, the signal, "throttle_report_enabled" in the same message reports properly. The override report signals of steering/brake works well. The operator override was being generated but not published. Fix: Used operator override logic the brake is using. Verification: Ran `https://github.com/PolySync/oscc-check/blob/master/oscc-check.py` to enable all modules. Performed a throttle operator override. Verified throttle operator overide ``` $ candump can0,093:7FF can0 093 [8] 05 CC 01 00 00 B5 08 B8 can0 093 [8] 05 CC 01 00 00 B5 08 B8 can0 093 [8] 05 CC 01 00 00 5F 02 1F can0 093 [8] 05 CC 00 01 02 B5 08 B8 can0 093 [8] 05 CC 00 01 02 B5 08 B8 can0 093 [8] 05 CC 00 01 02 B5 08 B8 ``` --- firmware/throttle/src/throttle_control.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/firmware/throttle/src/throttle_control.cpp b/firmware/throttle/src/throttle_control.cpp index 3745a0e8..4c15b5b3 100644 --- a/firmware/throttle/src/throttle_control.cpp +++ b/firmware/throttle/src/throttle_control.cpp @@ -61,8 +61,7 @@ void check_for_faults( void ) DEBUG_PRINTLN( "Bad value read from accelerator position sensor" ); } - else if ( operator_overridden == true - && g_throttle_control_state.operator_override == false ) + else if ( operator_overridden == true ) { disable_control( ); From 07bbd1f28107c61222ad1e9b3d28bf48c2820a15 Mon Sep 17 00:00:00 2001 From: Boris Bidault Date: Wed, 24 Oct 2018 10:33:26 -0700 Subject: [PATCH 6/6] remove speed and throttle pressure CAN IDs --- firmware/can_gateway/src/communications.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/firmware/can_gateway/src/communications.cpp b/firmware/can_gateway/src/communications.cpp index a80a294a..8589e128 100644 --- a/firmware/can_gateway/src/communications.cpp +++ b/firmware/can_gateway/src/communications.cpp @@ -49,9 +49,7 @@ void republish_obd_frames_to_control_can_bus( void ) { if( (rx_frame.id == KIA_SOUL_OBD_STEERING_WHEEL_ANGLE_CAN_ID) || (rx_frame.id == KIA_SOUL_OBD_WHEEL_SPEED_CAN_ID) - || (rx_frame.id == KIA_SOUL_OBD_BRAKE_PRESSURE_CAN_ID) - || (rx_frame.id == KIA_SOUL_OBD_THROTTLE_PRESSURE_CAN_ID) - || (rx_frame.id == KIA_SOUL_OBD_SPEED_CAN_ID) ) + || (rx_frame.id == KIA_SOUL_OBD_BRAKE_PRESSURE_CAN_ID) ) { cli(); g_control_can.sendMsgBuf(