From 408193b6b7111dbdc48f6af84ce1b50195d7a855 Mon Sep 17 00:00:00 2001 From: Ben Hall Date: Sat, 11 May 2024 15:11:22 -0400 Subject: [PATCH 1/4] fixing repo library dep clone directives --- platformio.ini | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/platformio.ini b/platformio.ini index d69ab7739..e070b9035 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,7 +12,8 @@ test_ignore= test_interfaces* lib_deps= git+ssh://git@github.com/hytech-racing/CASE_lib.git#v39 - https://github.com/hytech-racing/shared_firmware_systems.git + https://github.com/hytech-racing/shared_firmware_systems.git#af96a63 + [env:teensy41] ; Testing variables @@ -44,10 +45,10 @@ upload_protocol = teensy-cli extra_scripts = pre:extra_script.py lib_deps = SPI - https://github.com/hytech-racing/shared_firmware_interfaces.git - https://github.com/hytech-racing/shared_firmware_systems.git - https://github.com/RCMast3r/spi_libs - https://github.com/tonton81/FlexCAN_T4 + https://github.com/hytech-racing/shared_firmware_interfaces.git#cf47a18 + https://github.com/hytech-racing/shared_firmware_systems.git#af96a63 + https://github.com/RCMast3r/spi_libs#2214fee + https://github.com/tonton81/FlexCAN_T4#b928bcb https://github.com/RCMast3r/hytech_can#testing_new_inv_ids https://github.com/hytech-racing/HT_CAN/releases/download/80/can_lib.tar.gz git+ssh://git@github.com/hytech-racing/CASE_lib.git#v39 @@ -77,8 +78,8 @@ board = teensy41 framework = arduino upload_protocol = teensy-cli lib_deps = - https://github.com/tonton81/FlexCAN_T4 - https://github.com/RCMast3r/hytech_can + https://github.com/tonton81/FlexCAN_T4#b928bcb + https://github.com/RCMast3r/hytech_can#4ffbba4 https://github.com/hytech-racing/HT_CAN/releases/latest/download/can_lib.tar.gz From 1416d3eb16d117c7cb9bd9fb9273aa1d3a93779c Mon Sep 17 00:00:00 2001 From: Ben Hall Date: Sat, 11 May 2024 15:24:45 -0400 Subject: [PATCH 2/4] adding private member functions to doxygen docs --- Doxyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doxyfile b/Doxyfile index d21d7606f..94c359474 100644 --- a/Doxyfile +++ b/Doxyfile @@ -524,7 +524,7 @@ EXTRACT_ALL = YES # be included in the documentation. # The default value is: NO. -EXTRACT_PRIVATE = NO +EXTRACT_PRIVATE = YES # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. From 2b5642365faf8db118b26bba7cd2324b8d8ffa7f Mon Sep 17 00:00:00 2001 From: CL16gtgh Date: Wed, 22 May 2024 14:26:14 -0400 Subject: [PATCH 3/4] not working when steered to right --- include/MCU_rev15_defs.h | 2 +- src/main.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/MCU_rev15_defs.h b/include/MCU_rev15_defs.h index eee487cb9..dd0cc7752 100644 --- a/include/MCU_rev15_defs.h +++ b/include/MCU_rev15_defs.h @@ -86,7 +86,7 @@ const float LOADCELL_RR_SCALE = 0.06; const float LOADCELL_RR_OFFSET = 23.761 / LOADCELL_RR_SCALE; // Steering parameters -const float PRIMARY_STEERING_SENSE_OFFSET = -21.18; // units are degrees +const float PRIMARY_STEERING_SENSE_OFFSET = 0.0; // units are degrees const int SECONDARY_STEERING_SENSE_LEFTMOST_BOUND = 812; const int SECONDARY_STEERING_SENSE_RIGHTMOST_BOUND = 3179; const int SECONDARY_STEERING_SENSE_CENTER = 1970; diff --git a/src/main.cpp b/src/main.cpp index ec9079834..1b35c18fc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -325,6 +325,15 @@ void loop() // send CAN send_all_CAN_msgs(CAN2_txBuffer, &INV_CAN); send_all_CAN_msgs(CAN3_txBuffer, &TELEM_CAN); + + if (curr_tick.triggers.trigger5) + { + Serial.print("Steering system angle: "); + Serial.println(steering_system.getSteeringSystemData().angle); + Serial.print("Steering system status: "); + Serial.println(static_cast(steering_system.getSteeringSystemData().status)); + } + } /* From bb038370a0f0c13cd0e1e4bcb25e634b6ee7feed Mon Sep 17 00:00:00 2001 From: CL16gtgh Date: Wed, 22 May 2024 15:10:02 -0400 Subject: [PATCH 4/4] more detailed steering report --- src/main.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1b35c18fc..776eca31a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -328,10 +328,19 @@ void loop() if (curr_tick.triggers.trigger5) { - Serial.print("Steering system angle: "); + Serial.print("Steering system reported angle (deg): "); Serial.println(steering_system.getSteeringSystemData().angle); - Serial.print("Steering system status: "); - Serial.println(static_cast(steering_system.getSteeringSystemData().status)); + Serial.print("Primary sensor angle: "); + Serial.println(steering1.convert().angle); + Serial.print("Secondary sensor angle: "); + Serial.print(a1.get().conversions[MCU15_STEERING_CHANNEL].conversion); + Serial.print(" raw: "); + Serial.println(a1.get().conversions[MCU15_STEERING_CHANNEL].raw); + Serial.print("Sensor divergence: "); + Serial.println(steering1.convert().angle - a1.get().conversions[MCU15_STEERING_CHANNEL].conversion); + Serial.println(); + + Serial.println(); } }