Skip to content

Commit

Permalink
Spelling Corrections
Browse files Browse the repository at this point in the history
Resolve a small number of comment/readme spelling errors.
  • Loading branch information
Jared-Is-Coding authored and lukash committed Aug 14, 2024
1 parent 634d242 commit cdf0724
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Contributions are welcome and appreciated, please refer to [Contributing](CONTRI

## Building
### Requirements
- `gcc-arm-embedded` vesrsion 13 or higher
- `gcc-arm-embedded` version 13 or higher
- `make`
- `vesc_tool`

Expand Down
4 changes: 2 additions & 2 deletions package_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Refloat configuration and tunes are 100% compatible with Float 1.3 (and hence al
#### Separate Axis KP
The Mahony KP can now be configured separately for each IMU axis. This feature improves the way the board handles in turns and in a significant way improves the balance profile.

Technical explanation: High Mahony KP works very well for balancing, but it is only desirable on the pitch axis. The mellow response of high KP has unwanted effects on the roll axis, because when the board rotates in yaw (when turning), roll becomes pitch. The board leads into a turn angled in roll (more pronounced on roundier tires), and this angle translates into pitch and lingers there for an amount of time determined by the KP, causing the nose to be down for a time, until it balances back up.
Technical explanation: High Mahony KP works very well for balancing, but it is only desirable on the pitch axis. The mellow response of high KP has unwanted effects on the roll axis, because when the board rotates in yaw (when turning), roll becomes pitch. The board leads into a turn angled in roll (more pronounced on rounder tires), and this angle translates into pitch and lingers there for an amount of time determined by the KP, causing the nose to be down for a time, until it balances back up.

Lower roll KP makes the nose hold up better in turns. It makes the board more stable and "stiffer", especially in short carves. This means **the Turn Tilt feature may be less needed** and it may respond more aggresively.
Lower roll KP makes the nose hold up better in turns. It makes the board more stable and "stiffer", especially in short carves. This means **the Turn Tilt feature may be less needed** and it may respond more aggressively.

Mahony configuration in Firmware App Config -> IMU is now a setting independent from Refloat. It is used for general purpose pitch, roll and yaw only (this pitch is called "true pitch" in Float). It is recommended to use Mahony KP 0.4 and Mahony KI 0 there, and these values will be set automatically by Refloat if Mahony KP > 1 is encountered in the App Config -> IMU configuration.

Expand Down
3 changes: 2 additions & 1 deletion src/atr.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ static void braketilt_update(
) {
// braking also should cause setpoint change lift, causing a delayed lingering nose lift
if (atr->braketilt_factor < 0 && motor->braking && motor->abs_erpm > 2000) {
// negative currents alone don't necessarily consitute active braking, look at proportional:
// negative currents alone don't necessarily constitute active braking, look at
// proportional:
if (sign(proportional) != motor->erpm_sign) {
float downhill_damper = 1;
// if we're braking on a downhill we don't want braking to lift the setpoint quite as
Expand Down
6 changes: 3 additions & 3 deletions src/balance_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//
// Date Author Notes
// 29/09/2011 SOH Madgwick Initial release
// 02/10/2011 SOH Madgwick Optimised for reduced CPU load
// 02/10/2011 SOH Madgwick Optimized for reduced CPU load
// 26/01/2014 Benjamin V Adaption to our platform
// 20/02/2017 Benjamin V Added Madgwick algorithm and refactoring
// 17/09/2023 Lukas Hrazky Adopted from vedderb/bldc, modified for self-balancing skateboard
Expand Down Expand Up @@ -50,7 +50,7 @@ static float calculate_acc_confidence(float new_acc_mag, BalanceFilterData *data
}

void balance_filter_init(BalanceFilterData *data) {
// Init with internal filter orientation, otherwise the AHRS would need a while to stabilise
// Init with internal filter orientation, otherwise the AHRS would need a while to stabilize
float quat[4];
VESC_IF->imu_get_quaternions(quat);
data->q0 = quat[0];
Expand Down Expand Up @@ -89,7 +89,7 @@ void balance_filter_update(BalanceFilterData *data, float *gyro_xyz, float *acce
float two_kp_roll = 2.0 * data->kp_roll * accel_confidence;
float two_kp_yaw = 2.0 * data->kp_yaw * accel_confidence;

// Normalise accelerometer measurement
// Normalize accelerometer measurement
float recip_norm = inv_sqrt(ax * ax + ay * ay + az * az);
ax *= recip_norm;
ay *= recip_norm;
Expand Down
2 changes: 1 addition & 1 deletion src/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void strip_set_color(
}
}

// Returns a cosine wave oscilataing from 0 to 1, starting at 0, with a period of 2s.
// Returns a cosine wave oscillating from 0 to 1, starting at 0, with a period of 2s.
static float cosine_progress(float time) {
uint32_t rounded = lroundf(time);
float x = (time - rounded) * M_PI;
Expand Down
2 changes: 1 addition & 1 deletion src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ float clampf(float value, float min, float max);
/**
* Rate-limits @p value towards @p target by an amount of maximum value of @p step.
*
* If the difference between @p value and @p target is greated than step, @p
* If the difference between @p value and @p target is greater than step, @p
* value is increased or decreased (if @p target is greater or less than @p
* value respectively) by @p step. Otherwise, @p value is set to @p target.
*
Expand Down

0 comments on commit cdf0724

Please sign in to comment.