Merge branch 'main' of github.com:Orkavian/kaptan

This commit is contained in:
Onur Özkan committed 2026-07-26 18:05:58 +03:00
commit f8ee799208
7 files changed
+136 -146

No files matched your search

@@ -1,8 +1,7 @@
use core::sync::atomic::{AtomicBool, Ordering};
use kaptan_actuator::{
DshotConfig,
dshot::{ArmSequence, FRAME_SYMBOLS, FrameValue, Throttle, Timing, symbols},
use kaptan_actuator::dshot::{
ArmSequence, Config, FRAME_SYMBOLS, FrameValue, Throttle, Timing, symbols,
};
use stm32f7::stm32f722;
@@ -34,7 +33,7 @@ impl Tim3Dshot {
rcc: &stm32f722::RCC,
timer: stm32f722::TIM3,
scheduler: stm32f722::TIM5,
config: DshotConfig,
config: Config,
) -> Self {
let rate = config.rate();
let dshot_timer_hz = rate.timer_base_hz();
@@ -1,9 +1,6 @@
use core::sync::atomic::{AtomicU16, Ordering};
use kaptan_actuator::{
PwmConfig,
pwm::{ArmSequence, FrameValue, PulseWidth},
};
use kaptan_actuator::pwm::{ArmSequence, Config, FrameValue, PulseWidth};
use stm32f7::stm32f722;
const APB1_TIMER_CLOCK_HZ: u32 = 108_000_000;
@@ -28,7 +25,7 @@ pub(super) struct Tim3Pwm {
}
impl Tim3Pwm {
pub(super) fn new(rcc: &stm32f722::RCC, timer: stm32f722::TIM3, config: PwmConfig) -> Self {
pub(super) fn new(rcc: &stm32f722::RCC, timer: stm32f722::TIM3, config: Config) -> Self {
let period_us = match config.frame_rate().period_microseconds() {
Some(period) => period,
None => unreachable!(),
+1 -1
View File
@@ -36,7 +36,7 @@ pub const LIDAR_ACQUISITION_MODE: AcquisitionMode = AcquisitionMode::WithReceive
pub const LIDAR_STARTUP_TICKS: u8 = 3;
/// ESC protocol selected for this board's M1–M4 output route.
pub const MOTOR_PROTOCOL: MotorProtocol = MotorProtocol::Dshot(
match kaptan_actuator::DshotConfig::new(
match kaptan_actuator::dshot::Config::new(
kaptan_actuator::dshot::Rate::Dshot600,
match kaptan_actuator::dshot::Throttle::new(300) {
Some(throttle) => throttle,