Skip to content

Commit ab2f2ae

Browse files
committed
fix: clean init method for cogging data
1 parent dcfd51e commit ab2f2ae

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Firmware/FFBoard/UserExtensions/Inc/TMC4671.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ extern TIM_HandleTypeDef TIM_TMC;
6666
#endif
6767

6868
struct Harmonic {
69-
float32_t amplitude = 0.0f;
70-
float32_t phase = 0.0f;
71-
uint16_t order = 0;
69+
float32_t amplitude;
70+
float32_t phase;
71+
uint16_t order;
7272
};
7373

7474
struct CoggingCalibData {

Firmware/FFBoard/UserExtensions/Src/TMC4671.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void TMC4671::saveAdcParams(){
158158

159159
#ifdef COGGING_TABLE_FLASH_START_ADDRESS
160160
void TMC4671::saveCoggingTable(){
161-
Flash_WriteCoggingTable(this->drv_address - 1, (int16_t*)this->cogging_harmonics);
161+
Flash_WriteCoggingTable(this->drv_address - 1, (void*)this->cogging_harmonics);
162162
}
163163

164164
void TMC4671::clearCoggingTable(){

0 commit comments

Comments
 (0)