Skip to content

Commit

Permalink
arm disarm service functions, the firmware is ready for water test
Browse files Browse the repository at this point in the history
Z4nna committed Nov 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b74371c commit 1df64b4
Showing 11 changed files with 44,794 additions and 44,692 deletions.
2 changes: 1 addition & 1 deletion .cproject
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.587010246" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug" preannouncebuildStep="" prebuildStep="">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.587010246" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug" preannouncebuildStep="" prebuildStep="docker pull microros/micro_ros_static_library_builder:humble &amp;&amp; docker run --rm -v ${workspace_loc:/${ProjName}}:/project --env MICROROS_LIBRARY_FOLDER=micro_ros_stm32cubemx_utils/microros_static_library_ide microros/micro_ros_static_library_builder:humble">
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.587010246." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.700585538" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1118052022" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F469VITx" valueType="string"/>
4 changes: 2 additions & 2 deletions Core/Src/freertos.c
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@
#include <uxr/client/transport.h>
#include <rmw_microxrcedds_c/config.h>
#include <rmw_microros/rmw_microros.h>
#include <rclc_parameter/rclc_parameter.h>

#include "micro_ros_utilities/type_utilities.h"

@@ -241,7 +242,7 @@ void StartDefaultTask(void *argument)
if (rc != RCL_RET_OK) printf("Error (line %d)\n", __LINE__);

executor = rclc_executor_get_zero_initialized_executor();
rc = rclc_executor_init(&executor, &support.context, NUMBER_SUBS_TIMS_SRVS, &allocator);
rc = rclc_executor_init(&executor, &support.context, NUMBER_SUBS_TIMS_SRVS + RCLC_EXECUTOR_PARAMETER_SERVER_HANDLES, &allocator);
if (rc != RCL_RET_OK) printf("Error (line %d)\n", __LINE__);

// PUBLISHERS
@@ -390,7 +391,6 @@ void cmd_vel_subscription_callback (const void * msgin) {

}
void arm_disarm_service_callback(const void * request_msg, void * response_msg) {
printf("Inside arm-disarm.\n");
std_srvs__srv__SetBool_Request * req_in = (std_srvs__srv__SetBool_Request *) request_msg;
std_srvs__srv__SetBool_Response * res_in = (std_srvs__srv__SetBool_Response *) response_msg;

Binary file modified Debug/Core/Src/dma_transport.o
Binary file not shown.
16 changes: 8 additions & 8 deletions Debug/Core/Src/freertos.cyclo
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
../Core/Src/freertos.c:139:6:MX_FREERTOS_Init 1
../Core/Src/freertos.c:181:6:StartDefaultTask 19
../Core/Src/freertos.c:352:13:set_pwms 1
../Core/Src/freertos.c:365:13:set_pwm_idle 1
../Core/Src/freertos.c:378:6:constrain_pwm_output 4
../Core/Src/freertos.c:386:6:imu_subscription_callback 1
../Core/Src/freertos.c:389:6:cmd_vel_subscription_callback 1
../Core/Src/freertos.c:392:6:arm_disarm_service_callback 1
../Core/Src/freertos.c:140:6:MX_FREERTOS_Init 1
../Core/Src/freertos.c:182:6:StartDefaultTask 19
../Core/Src/freertos.c:353:13:set_pwms 1
../Core/Src/freertos.c:366:13:set_pwm_idle 1
../Core/Src/freertos.c:379:6:constrain_pwm_output 4
../Core/Src/freertos.c:387:6:imu_subscription_callback 1
../Core/Src/freertos.c:390:6:cmd_vel_subscription_callback 1
../Core/Src/freertos.c:393:6:arm_disarm_service_callback 1
../Core/Src/freertos.c:404:6:set_nav_mode_service_callback 1
104 changes: 100 additions & 4 deletions Debug/Core/Src/freertos.d

Large diffs are not rendered by default.

Binary file modified Debug/Core/Src/freertos.o
Binary file not shown.
16 changes: 8 additions & 8 deletions Debug/Core/Src/freertos.su
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
../Core/Src/freertos.c:139:6:MX_FREERTOS_Init 8 static
../Core/Src/freertos.c:181:6:StartDefaultTask 1000 static
../Core/Src/freertos.c:352:13:set_pwms 16 static
../Core/Src/freertos.c:365:13:set_pwm_idle 4 static
../Core/Src/freertos.c:378:6:constrain_pwm_output 24 static
../Core/Src/freertos.c:386:6:imu_subscription_callback 24 static
../Core/Src/freertos.c:389:6:cmd_vel_subscription_callback 16 static
../Core/Src/freertos.c:392:6:arm_disarm_service_callback 24 static
../Core/Src/freertos.c:140:6:MX_FREERTOS_Init 8 static
../Core/Src/freertos.c:182:6:StartDefaultTask 1000 static
../Core/Src/freertos.c:353:13:set_pwms 16 static
../Core/Src/freertos.c:366:13:set_pwm_idle 4 static
../Core/Src/freertos.c:379:6:constrain_pwm_output 24 static
../Core/Src/freertos.c:387:6:imu_subscription_callback 24 static
../Core/Src/freertos.c:390:6:cmd_vel_subscription_callback 16 static
../Core/Src/freertos.c:393:6:arm_disarm_service_callback 24 static
../Core/Src/freertos.c:404:6:set_nav_mode_service_callback 24 static
9 changes: 7 additions & 2 deletions Debug/makefile
Original file line number Diff line number Diff line change
@@ -59,7 +59,8 @@ nereo_fc.list \


# All Target
all: main-build
all:
+@$(MAKE) --no-print-directory pre-build && $(MAKE) --no-print-directory main-build

# Main-build Target
main-build: nereo_fc.elf secondary-outputs
@@ -85,6 +86,10 @@ clean:
-$(RM) default.size.stdout nereo_fc.elf nereo_fc.list nereo_fc.map
-@echo ' '

pre-build:
docker pull microros/micro_ros_static_library_builder:humble && docker run --rm -v /Users/michelecarenini/STM32CubeIDE/micro_ros_cube_ide_ws/nereo_fc:/project --env MICROROS_LIBRARY_FOLDER=micro_ros_stm32cubemx_utils/microros_static_library_ide microros/micro_ros_static_library_builder:humble
-@echo ' '

secondary-outputs: $(SIZE_OUTPUT) $(OBJDUMP_LIST)

fail-specified-linker-script-missing:
@@ -94,6 +99,6 @@ fail-specified-linker-script-missing:
warn-no-linker-script-specified:
@echo 'Warning: No linker script specified. Check the linker settings in the build configuration.'

.PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified
.PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified pre-build

-include ../makefile.targets
Binary file modified Debug/nereo_fc.elf
Binary file not shown.
Loading

0 comments on commit 1df64b4

Please sign in to comment.