Skip to content

Commit 27091b1

Browse files
committed
Merge remote-tracking branch 'simplefoc/dev' into dev
2 parents 9dbd91a + 0205da7 commit 27091b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2811
-1728
lines changed

.github/workflows/arduino_mbed.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: MDED
2+
on: [push, pull_request]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: arduino/arduino-lint-action@v1
9+
with:
10+
library-manager: update
11+
project-type: library
12+
build:
13+
name: Test compiling
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
arduino-boards-fqbn:
19+
#- arduino:mbed:giga # arudino giga
20+
- arduino:mbed:nanorp2040connect # arduino nano rp2040 connect
21+
- arduino:mbed:nano33ble # arduino nano 33 ble
22+
- arduino:mbed:envie_m7 # arduino portenta
23+
24+
include:
25+
- arduino-boards-fqbn: arduino:mbed:nanorp2040connect
26+
sketch-names: open_loop_position_example.ino
27+
28+
- arduino-boards-fqbn: arduino:mbed:nano33ble
29+
sketch-names: open_loop_position_example.ino
30+
31+
- arduino-boards-fqbn: arduino:mbed:envie_m7
32+
sketch-names: open_loop_position_example.ino
33+
34+
# - arduino-boards-fqbn: arduino:mbed:giga
35+
# sketch-names: single_full_control_example.ino
36+
37+
38+
# Do not cancel all jobs / architectures if one job fails
39+
fail-fast: false
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@master
43+
- name: Compile all examples
44+
uses: ArminJo/arduino-test-compile@master
45+
with:
46+
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
47+
required-libraries: ${{ matrix.required-libraries }}
48+
platform-url: ${{ matrix.platform-url }}
49+
sketch-names: ${{ matrix.sketch-names }}
50+
sketches-exclude: ${{ matrix.sketches-exclude }}
51+
build-properties: ${{ toJson(matrix.build-properties) }}

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
[![RP2040 build](https://github.com/simplefoc/Arduino-FOC/actions/workflows/rpi.yml/badge.svg)](https://github.com/simplefoc/Arduino-FOC/actions/workflows/rpi.yml)
88
[![SAMD build](https://github.com/simplefoc/Arduino-FOC/actions/workflows/samd.yml/badge.svg)](https://github.com/simplefoc/Arduino-FOC/actions/workflows/samd.yml)
99
[![Teensy build](https://github.com/simplefoc/Arduino-FOC/actions/workflows/teensy.yml/badge.svg)](https://github.com/simplefoc/Arduino-FOC/actions/workflows/teensy.yml)
10+
[![MBED build](https://github.com/simplefoc/Arduino-FOC/actions/workflows/arduino_mbed.yml/badge.svg)](https://github.com/simplefoc/Arduino-FOC/actions/workflows/arduino_mbed.yml)
1011

1112
![GitHub release (latest by date)](https://img.shields.io/github/v/release/simplefoc/arduino-foc)
1213
![GitHub Release Date](https://img.shields.io/github/release-date/simplefoc/arduino-foc?color=blue)
1314
![GitHub commits since tagged version](https://img.shields.io/github/commits-since/simplefoc/arduino-foc/latest/dev)
1415
![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/simplefoc/arduino-foc/dev)
1516

16-
[![arduino-library-badge](https://ardubadge.simplefoc.com?lib=Simple%20FOC)](https://www.ardu-badge.com/badge/Simple%20FOC.svg)
17+
[![arduino-library-badge](https://www.ardu-badge.com/badge/Simple%20FOC.svg)](https://www.ardu-badge.com/badge/Simple%20FOC.svg)
1718
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/askuric/library/Simple%20FOC.svg)](https://registry.platformio.org/libraries/askuric/Simple%20FOC)
1819
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1920
[![status](https://joss.theoj.org/papers/4382445f249e064e9f0a7f6c1bb06b1d/status.svg)](https://joss.theoj.org/papers/4382445f249e064e9f0a7f6c1bb06b1d)
@@ -29,12 +30,29 @@ Therefore this is an attempt to:
2930
- For official driver boards see [<span class="simple">Simple<span class="foc">FOC</span>Boards</span>](https://docs.simplefoc.com/boards)
3031
- Many many more boards developed by the community members, see [<span class="simple">Simple<span class="foc">FOC</span>Community</span>](https://community.simplefoc.com/)
3132

32-
> NEXT RELEASE 📢 : <span class="simple">Simple<span class="foc">FOC</span>library</span> v2.3.5
33-
> - Motor characterization code thanks to @mcells
34-
> - Bugfix for ESP32 C6 thanks to @kondor1622
33+
> NEXT RELEASE 📢 : <span class="simple">Simple<span class="foc">FOC</span>library</span> v2.3.5
34+
>
35+
> - ESP32 bugfix
36+
> - after the low-level API changes in the Arduino-ESP32 core [PR447](https://github.com/simplefoc/Arduino-FOC/pull/447)
37+
> - Pin is not configured [PR458](https://github.com/simplefoc/Arduino-FOC/pull/458)
38+
> - C6 MCPWM bugfix [PR440](https://github.com/simplefoc/Arduino-FOC/pull/440)
39+
> - New fuctionality
40+
> - HybridStepperMotor added to the main library [PR457](https://github.com/simplefoc/Arduino-FOC/pull/457) - [see in docs](https://docs.simplefoc.com/steppermotor)
41+
> - Motor characterisation (phase resistance and inductance) [PR436](https://github.com/simplefoc/Arduino-FOC/pull/436) - [see in docs](https://docs.simplefoc.com/bldcmotor#how-can-i-measure-the-phase-resistance-and-inductance)
42+
> - SAMD21 support for low-side current sensing [PR479](https://github.com/simplefoc/Arduino-FOC/pull/479)
43+
> - RP2350 support [PR435](https://github.com/simplefoc/Arduino-FOC/pull/435) [PR468](https://github.com/simplefoc/Arduino-FOC/pull/468)
44+
> - STM32
45+
> - New driver code [PR442](https://github.com/simplefoc/Arduino-FOC/pull/442)
46+
> - Low-side current sensing support for H7 family [PR460](https://github.com/simplefoc/Arduino-FOC/pull/460)
47+
> - Docs
48+
> - Hybrid stepper motor example [see in docs](https://docs.simplefoc.com/stepper_control_shield)
49+
> - Sensorless FOC example [see in docs](https://docs.simplefoc.com/sensorless_foc_nucleo_example)
50+
> - A short guide to synchronous loop - [see in docs](https://docs.simplefoc.com/real_time_loop)
3551
> - See the complete list of bugfixes and new features of v2.3.5 [fixes and PRs](https://github.com/simplefoc/Arduino-FOC/milestone/12)
3652
3753

54+
55+
3856
## Arduino *SimpleFOClibrary* v2.3.5
3957

4058
<p align="">

src/BLDCMotor.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,13 @@ int BLDCMotor::init() {
9393
P_angle.limit = velocity_limit;
9494

9595
// if using open loop control, set a CW as the default direction if not already set
96-
if ((controller==MotionControlType::angle_openloop
97-
||controller==MotionControlType::velocity_openloop)
98-
&& (sensor_direction == Direction::UNKNOWN)) {
99-
sensor_direction = Direction::CW;
96+
// only if no sensor is used
97+
if(!sensor){
98+
if ((controller==MotionControlType::angle_openloop
99+
||controller==MotionControlType::velocity_openloop)
100+
&& (sensor_direction == Direction::UNKNOWN)) {
101+
sensor_direction = Direction::CW;
102+
}
100103
}
101104

102105
_delay(500);

0 commit comments

Comments
 (0)