mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-14 00:01:08 +08:00
Merge branch 'devel' of github.com:madcowswe/ODrive into sam_build_config
This commit is contained in:
+9
-4
@@ -1,12 +1,17 @@
|
||||
# adapted from https://github.com/andysworkshop/stm32plus/blob/master/.travis.yml
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- devel
|
||||
|
||||
language: c
|
||||
sudo: false
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
libc6-i386
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
libc6-i386
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
#define TIM_APB1_CLOCK_HZ 84000000
|
||||
#define TIM_APB1_PERIOD_CLOCKS 4096
|
||||
#define TIM_APB1_DEADTIME_CLOCKS 40
|
||||
#define TIM_TIME_BASE TIM14
|
||||
|
||||
|
||||
#define M0_nCS_Pin GPIO_PIN_13
|
||||
#define M0_nCS_GPIO_Port GPIOC
|
||||
|
||||
+10
-5
@@ -1,17 +1,22 @@
|
||||
## UNRELEASED
|
||||
Please add a note of your changes below this heading if you make a PR
|
||||
# Unreleased Features
|
||||
Please add a note of your changes below this heading if you make a Pull Request.
|
||||
|
||||
* **Storing of configuration parameters to Non Volatile Memory**
|
||||
|
||||
# Releases
|
||||
|
||||
## [0.3.5] - 2018-03-04
|
||||
|
||||
### Added
|
||||
* **Storing of configuration parameters to Non Volatile Memory**
|
||||
* Reporting error if your encoder CPR is incorrect
|
||||
* Ability to start anticogging calibration over USB protocol
|
||||
* Reporting of DRV status/control registers and fault codes
|
||||
* DRV status read script
|
||||
* Microsecond delay function
|
||||
* Ability to start anticogging calibration over USB protocol
|
||||
* Travis-CI
|
||||
|
||||
### Changed
|
||||
* Build system is now tup instead of make
|
||||
* Build system is now tup instead of make. Please check the [Readme](README.md#installing-prerequisites) for installation instructions.
|
||||
|
||||
## [0.3.4] - 2018-02-13
|
||||
|
||||
|
||||
@@ -305,6 +305,19 @@ const Endpoint endpoints[] = {
|
||||
Endpoint::make_function("set_current_setpoint", &motors_1_set_current_setpoint_func),
|
||||
Endpoint::make_property("current_setpoint", &motors[1].set_current_setpoint_args.current_setpoint),
|
||||
Endpoint::close_tree(),
|
||||
Endpoint::make_object("timing_log"),
|
||||
Endpoint::make_property("TIMING_LOG_GENERAL", &motors[1].timing_log[TIMING_LOG_GENERAL]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M0_I", &motors[1].timing_log[TIMING_LOG_ADC_CB_M0_I]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M0_DC", &motors[1].timing_log[TIMING_LOG_ADC_CB_M0_DC]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M1_I", &motors[1].timing_log[TIMING_LOG_ADC_CB_M1_I]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M1_DC", &motors[1].timing_log[TIMING_LOG_ADC_CB_M1_DC]),
|
||||
Endpoint::make_property("TIMING_LOG_MEAS_R", &motors[1].timing_log[TIMING_LOG_MEAS_R]),
|
||||
Endpoint::make_property("TIMING_LOG_MEAS_L", &motors[1].timing_log[TIMING_LOG_MEAS_L]),
|
||||
Endpoint::make_property("TIMING_LOG_ENC_CALIB", &motors[1].timing_log[TIMING_LOG_ENC_CALIB]),
|
||||
Endpoint::make_property("TIMING_LOG_IDX_SEARCH", &motors[1].timing_log[TIMING_LOG_IDX_SEARCH]),
|
||||
Endpoint::make_property("TIMING_LOG_FOC_VOLTAGE", &motors[1].timing_log[TIMING_LOG_FOC_VOLTAGE]),
|
||||
Endpoint::make_property("TIMING_LOG_FOC_CURRENT", &motors[1].timing_log[TIMING_LOG_FOC_CURRENT]),
|
||||
Endpoint::close_tree(),
|
||||
Endpoint::close_tree(), // motor1
|
||||
Endpoint::make_function("save_configuration", &save_configuration),
|
||||
// no arguments
|
||||
@@ -315,19 +328,6 @@ const Endpoint endpoints[] = {
|
||||
Endpoint::make_function("reboot", &NVIC_SystemReset),
|
||||
// no arguments
|
||||
Endpoint::close_tree(),
|
||||
Endpoint::make_object("timing_log"),
|
||||
Endpoint::make_property("TIMING_LOG_GENERAL", &motors[1].timing_log[TIMING_LOG_GENERAL]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M0_I", &motors[1].timing_log[TIMING_LOG_ADC_CB_M0_I]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M0_DC", &motors[1].timing_log[TIMING_LOG_ADC_CB_M0_DC]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M1_I", &motors[1].timing_log[TIMING_LOG_ADC_CB_M1_I]),
|
||||
Endpoint::make_property("TIMING_LOG_ADC_CB_M1_DC", &motors[1].timing_log[TIMING_LOG_ADC_CB_M1_DC]),
|
||||
Endpoint::make_property("TIMING_LOG_MEAS_R", &motors[1].timing_log[TIMING_LOG_MEAS_R]),
|
||||
Endpoint::make_property("TIMING_LOG_MEAS_L", &motors[1].timing_log[TIMING_LOG_MEAS_L]),
|
||||
Endpoint::make_property("TIMING_LOG_ENC_CALIB", &motors[1].timing_log[TIMING_LOG_ENC_CALIB]),
|
||||
Endpoint::make_property("TIMING_LOG_IDX_SEARCH", &motors[1].timing_log[TIMING_LOG_IDX_SEARCH]),
|
||||
Endpoint::make_property("TIMING_LOG_FOC_VOLTAGE", &motors[1].timing_log[TIMING_LOG_FOC_VOLTAGE]),
|
||||
Endpoint::make_property("TIMING_LOG_FOC_CURRENT", &motors[1].timing_log[TIMING_LOG_FOC_CURRENT]),
|
||||
Endpoint::close_tree(),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -187,13 +187,13 @@ uint32_t timeout_to_deadline(uint32_t timeout_ms) {
|
||||
|
||||
// @brief: Returns number of microseconds since system startup
|
||||
uint32_t micros(void) {
|
||||
uint32_t usTicks = HAL_RCC_GetSysClockFreq() / 1000000;
|
||||
register uint32_t ms, cycle_cnt;
|
||||
do {
|
||||
ms = HAL_GetTick();
|
||||
cycle_cnt = SysTick->VAL;
|
||||
} while (ms != HAL_GetTick());
|
||||
return (ms * 1000) + (usTicks * 1000 - cycle_cnt) / usTicks;
|
||||
cycle_cnt = TIM_TIME_BASE->CNT;
|
||||
} while (ms != HAL_GetTick());
|
||||
|
||||
return (ms * 1000) + cycle_cnt;
|
||||
}
|
||||
|
||||
// @brief: Busy wait delay for given amount of microseconds (us)
|
||||
@@ -203,4 +203,4 @@ void delay_us(uint32_t us)
|
||||
while (micros() - start < (uint32_t) us) {
|
||||
__ASM("nop");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user