Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carbonix Custom Hardware Def #73

Merged
merged 10 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/test_scripting_docs.yml

This file was deleted.

1 change: 1 addition & 0 deletions Tools/AP_Periph/AP_Periph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <AP_HAL/AP_HAL_Boards.h>
#include "AP_Periph.h"
#include <stdio.h>
#include <dronecan_msgs.h>

#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
#include <AP_HAL_ChibiOS/hwdef/common/stm32_util.h>
Expand Down
3 changes: 3 additions & 0 deletions Tools/AP_Periph/AP_Periph.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ class AP_Periph_FW {

#if HAL_GCS_ENABLED
GCS_Periph _gcs;
#endif
#ifdef HAL_PERIPH_ARM_MONITORING_ENABLE
bool arm_update_status;
#endif
// setup the var_info table
AP_Param param_loader{var_info};
Expand Down
4 changes: 4 additions & 0 deletions Tools/AP_Periph/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ class Parameters {
AP_Int16 sysid_this_mav;
#endif

#ifdef HAL_PERIPH_ARM_MONITORING_ENABLE
AP_Int32 disarm_delay;
#endif

#ifdef HAL_PERIPH_ENABLE_EFI
AP_Int32 efi_baudrate;
AP_Int8 efi_port;
Expand Down
3 changes: 2 additions & 1 deletion Tools/AP_Periph/esc_apd_telem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ bool ESC_APD_Telem::update() {
// valid packet, copy the data we need and reset length
decoded.voltage = le16toh(received.packet.voltage) * 1e-2f;
decoded.temperature = convert_temperature(le16toh(received.packet.temperature));
decoded.current = le16toh(received.packet.bus_current) * (1 / 12.5f);
int16_t temp_current = le16toh(received.packet.bus_current);
decoded.current = temp_current * (1 / 12.5f);
decoded.rpm = le32toh(received.packet.erpm) / pole_count;
decoded.power_rating_pct = le16toh(received.packet.motor_duty) * 1e-2f;
ret = true;
Expand Down
43 changes: 43 additions & 0 deletions Tools/Carbonix_scripts/carbonix_waf_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# Exit if any command fails
set -e

# Check unstaged changes
if [[ $(git status --porcelain) ]]; then
echo "Error: There are unstaged changes in the repository."
exit 1
fi

# Check outdated submodules
# git submodule update --remote --quiet
# outdated_submodules=$(git submodule status | grep -e '-[[:alnum:]]' | awk '{print $2}')
# if [[ -n $outdated_submodules ]]; then
# echo "The following submodules are not updated:"
# echo "$outdated_submodules"
# exit 1
# fi

echo "Running distclean..."
./waf distclean

main_boards=("CarbonixCubeOrange" "CubeOrange" "sitl")
loki077 marked this conversation as resolved.
Show resolved Hide resolved

for board in "${main_boards[@]}"; do
echo "Compiling Plane for $board..."
./Tools/scripts/build_bootloaders.py "$board"
./waf configure --board "$board"
./waf plane
done

periph_boards=("CarbonixF405" "Volanti-M1" "Volanti-M2" "Volanti-M3" "Volanti-M4" "Volanti-M5" "Volanti-LWing" "Volanti-RWing" "Volanti-LTail" "Volanti-RTail" "Ottano-M1" "Ottano-M2" "Ottano-M3" "Ottano-M4" "Ottano-M5" "Ottano-LWing" "Ottano-RWing" "Ottano-LTail" "Ottano-RTail")
loki077 marked this conversation as resolved.
Show resolved Hide resolved

for board in "${periph_boards[@]}"; do
echo "Compiling AP_Periph for $board..."
./Tools/scripts/build_bootloaders.py "$board"
./waf configure --board "$board"
./waf AP_Periph
done


echo "Script completed successfully."
Binary file added Tools/bootloaders/CarbonixCubeOrange_bl.bin
Binary file not shown.
Loading