Skip to content

Commit 4d117ba

Browse files
Merge pull request simplefoc#319 from runger1101001/dev
Fixes after 2.3.1 Release
2 parents aa7e3ec + f1d6de2 commit 4d117ba

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ Therefore this is an attempt to:
2626
- See also [@byDagor](https://github.com/byDagor)'s *fully-integrated* ESP32 based board: [Dagor Brushless Controller](https://github.com/byDagor/Dagor-Brushless-Controller)
2727

2828
> NEW RELEASE 📢 : <span class="simple">Simple<span class="foc">FOC</span>library</span> v2.3.2
29+
> - Improved [space vector modulation code](https://github.com/simplefoc/Arduino-FOC/pull/309) thanks to [@Candas1](https://github.com/Candas1)
2930
> - Bugfix for teensy3.2 - [#321](https://github.com/simplefoc/Arduino-FOC/pull/321)
3031
> - Added teensy3/4 compile to the github CI using platformio
32+
> - And more bugfixes - see the [complete list of 2.3.2 fixes here](https://github.com/simplefoc/Arduino-FOC/issues?q=is%3Aissue+milestone%3A2.3.2_Release)
3133
3234
## Arduino *SimpleFOClibrary* v2.3.2
3335

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Simple FOC
2-
version=2.3.1
2+
version=2.3.2
33
author=Simplefoc <[email protected]>
44
maintainer=Simplefoc <[email protected]>
55
sentence=A library demistifying FOC for BLDC motors

src/StepperMotor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ int StepperMotor::alignSensor() {
134134
SIMPLEFOC_DEBUG("MOT: Align sensor.");
135135

136136
// if unknown natural direction
137-
if(!_isset(sensor_direction)){
137+
if(sensor_direction == Direction::UNKNOWN){
138138
// check if sensor needs zero search
139139
if(sensor->needsSearch()) exit_flag = absoluteZeroSearch();
140140
// stop init if not found index

src/drivers/hardware_specific/renesas/renesas.cpp

+3-12
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ bool configureTimerPin(RenesasHardwareDriverParams* params, uint8_t index, bool
144144
uint8_t timer_channel = GET_CHANNEL(pinCfgs[0]);
145145
// check its not used
146146
if (channel_used[timer_channel]) {
147-
SIMPLEFOC_DEBUG("DRV: channel in use");
147+
SIMPLEFOC_DEBUG("DRV: channel in use: ", timer_channel);
148148
return false;
149149
}
150150

@@ -262,26 +262,17 @@ bool configureTimerPin(RenesasHardwareDriverParams* params, uint8_t index, bool
262262
t->ext_cfg.gtior_setting.gtior_b.gtiob = 0x03 | (active_high ? 0x00 : 0x10);
263263
t->ext_cfg.gtior_setting.gtior_b.obdflt = active_high ? 0x00 : 0x01;
264264
}
265-
266-
// lets stop the timer in case its running
267-
if (GPT_OPEN == t->ctrl.open) {
268-
if (R_GPT_Stop(&(t->ctrl)) != FSP_SUCCESS) {
269-
SIMPLEFOC_DEBUG("DRV: timer stop failed");
270-
return false;
271-
}
272-
}
273-
274265
memset(&(t->ctrl), 0, sizeof(gpt_instance_ctrl_t));
275266
err = R_GPT_Open(&(t->ctrl),&(t->timer_cfg));
276267
if ((err != FSP_ERR_ALREADY_OPEN) && (err != FSP_SUCCESS)) {
277268
SIMPLEFOC_DEBUG("DRV: open failed");
278269
return false;
279270
}
280-
#if defined(SIMPLEFOC_RESENSAS_DEBUG)
281271
if (err == FSP_ERR_ALREADY_OPEN) {
282272
SimpleFOCDebug::println("DRV: timer already open");
273+
return false;
283274
}
284-
#endif
275+
285276
err = R_GPT_PeriodSet(&(t->ctrl), t->timer_cfg.period_counts);
286277
if (err != FSP_SUCCESS) {
287278
SIMPLEFOC_DEBUG("DRV: period set failed");

0 commit comments

Comments
 (0)