Skip to content

Commit c4b911d

Browse files
Merge pull request #291 from runger1101001/dev
Readme Update and AVR bugfix
2 parents b38ab40 + 0595b9f commit c4b911d

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

README.md

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,16 @@ Therefore this is an attempt to:
2424
- *Medium-power* BLDC driver (<30Amps): [Arduino <span class="simple">Simple<b>FOC</b>PowerShield</span> ](https://github.com/simplefoc/Arduino-SimpleFOC-PowerShield).
2525
- See also [@byDagor](https://github.com/byDagor)'s *fully-integrated* ESP32 based board: [Dagor Brushless Controller](https://github.com/byDagor/Dagor-Brushless-Controller)
2626

27-
> NEW RELEASE 📢 : <span class="simple">Simple<span class="foc">FOC</span>library</span> v2.3.0
28-
> - Arduino Mega 6pwm more timers supported
29-
> - Arduino boards - frequency change support either 32kHz or 4kHz
30-
> - Arduino Uno - synched timers in 3pwm and 6pwm mode [#71](https://github.com/simplefoc/Arduino-FOC/issues/71)
31-
> - Teensy 3.x initial support for 6pwm
32-
> - Teensy 4.x initial support for 6pwm
33-
> - Example for v3.1 SimpleFOCShield
34-
> - RP2040 compatibility for earlehillpower core [#234](https://github.com/simplefoc/Arduino-FOC/pull/234) [#236](https://github.com/simplefoc/Arduino-FOC/pull/236)
35-
> - More flexible monitoring API
36-
> - start, end and separator characters
37-
> - decimal places (settable through commander)
38-
> - Added machine readable verbose mode in `Commander` [#233](https://github.com/simplefoc/Arduino-FOC/pull/233)
39-
> - *Simple**FOC**WebController* - Web based user interface for SimpleFOC by [@geekuillaume](https://github.com/geekuillaume) - [webcontroller.simplefoc.com](webcontroller.simplefoc.com)
40-
> - bugfix - `MagneticSensorPWM` multiple occasions - [#258](https://github.com/simplefoc/Arduino-FOC/pull/258)
41-
> - bugfix - current sense align - added offset exchange when exchanging pins
42-
> - bugfix - trapezoid 150 fixed
43-
> - bugfix - 4pwm on ESP8266 [#224](https://github.com/simplefoc/Arduino-FOC/pull/224)
44-
> - Additional `InlineCurrentSense` and `LowsideCurrentSense` constructor using milliVolts per Amp [#253](https://github.com/simplefoc/Arduino-FOC/pull/253)
45-
> - STM32L4xx current sense support by [@Triple6](https://github.com/Triple6) (discord) [#257](https://github.com/simplefoc/Arduino-FOC/pull/257)
46-
> - phase disable in 6pwm mode
47-
> - stm32 - software and hardware 6pwm
48-
> - atmega328
49-
> - atmega2560
50-
> - Lag compensation using motor inductance [#246](https://github.com/simplefoc/Arduino-FOC/issues/246)
51-
> - current control through voltage torque mode enhancement
52-
> - extended `BLDCMotor` and `StepperMotor` constructors to receive the inductance paramerer
53-
> - can also be set using `motor.phase_inductance` or through `Commander`
54-
## Arduino *SimpleFOClibrary* v2.3
27+
> NEW RELEASE 📢 : <span class="simple">Simple<span class="foc">FOC</span>library</span> v2.3.1
28+
> - Support for Arduino UNO R4 Minima and UNO R4 WiFi (Renesas R7FA4M1 MCUs)
29+
> - Support setting PWM polarity on ESP32 (thanks to [@mcells](https://github.com/mcells))
30+
> - Expose I2C errors in MagneticSensorI2C (thanks to [@padok](https://github.com/padok))
31+
> - Improved default trig functions (sine, cosine) - faster, smaller
32+
> - Overridable trig functions - plug in your own optimized versions
33+
> - bugfix: microseconds overflow in velocity mode
34+
> - bugfix: KV initialization
35+
36+
## Arduino *SimpleFOClibrary* v2.3.1
5537

5638
<p align="">
5739
<a href="https://youtu.be/Y5kLeqTc6Zk">
@@ -78,7 +60,7 @@ This video demonstrates the *Simple**FOC**library* basic usage, electronic conne
7860
- **Cross-platform**:
7961
- Seamless code transfer from one microcontroller family to another
8062
- Supports multiple [MCU architectures](https://docs.simplefoc.com/microcontrollers):
81-
- Arduino: UNO, MEGA, DUE, Leonardo ....
63+
- Arduino: UNO R4, UNO, MEGA, DUE, Leonardo, Nano, Nano33 ....
8264
- STM32
8365
- ESP32
8466
- Teensy

src/common/foc_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ __attribute__((weak)) float _sin(float a){
99
// 16 bit precision on sine value, 8 bit fractional value for interpolation, 6bit LUT size
1010
// resulting precision compared to stdlib sine is 0.00006480 (RMS difference in range -PI,PI for 3217 steps)
1111
static uint16_t sine_array[65] = {0,804,1608,2411,3212,4011,4808,5602,6393,7180,7962,8740,9512,10279,11039,11793,12540,13279,14010,14733,15447,16151,16846,17531,18205,18868,19520,20160,20788,21403,22006,22595,23170,23732,24279,24812,25330,25833,26320,26791,27246,27684,28106,28511,28899,29269,29622,29957,30274,30572,30853,31114,31357,31581,31786,31972,32138,32286,32413,32522,32610,32679,32729,32758,32768};
12-
unsigned int i = (unsigned int)(a * (64*4*256 /_2PI));
12+
unsigned int i = (unsigned int)(a * (64*4*256.0 /_2PI));
1313
int t1, t2, frac = i & 0xff;
1414
i = (i >> 8) & 0xff;
1515
if (i < 64) {

0 commit comments

Comments
 (0)