1
0
forked from me/IronOS

Cleanup make includes and formatting rules (#1860)

* Draft cleanup of the folder definition mess

* Move old startup

* Fixup! broken hacky includes

* Update Makefile

* Update Makefile

* Update Makefile

* Bulk format

* Who knew, header guards are a wise idea

* Squash some sizing warnings

* Drop broken usb stack

* Fix BLE headers to be sensible

* Cleaning up proper c styling

* We have newer clang, it does bracketing now

* Run clang-format brackets

* We can drop the old messy bracket-checker with newer clang format

* WiP formatter

* Align grids of scripts by right side

Massively easier to read in nearly all cases

* Excempt the table for compression from formatter
This commit is contained in:
Ben V. Brown
2023-12-27 09:23:12 +11:00
committed by GitHub
parent 849d1f7d40
commit ec5f07ec0c
248 changed files with 58306 additions and 70269 deletions

View File

@@ -197,8 +197,8 @@ void drawHomeScreen(bool buttonLockout) {
// This is zero cost really as state is only changed on display updates
OLED::setDisplayState(OLED::DisplayState::ON);
if ((tipTemp < 50) && getSettingValue(SettingsOptions::Sensitivity)
&& (((xTaskGetTickCount() - lastMovementTime) > MOVEMENT_INACTIVITY_TIME) && ((xTaskGetTickCount() - lastButtonTime) > BUTTON_INACTIVITY_TIME))) {
if ((tipTemp < 50) && getSettingValue(SettingsOptions::Sensitivity) &&
(((xTaskGetTickCount() - lastMovementTime) > MOVEMENT_INACTIVITY_TIME) && ((xTaskGetTickCount() - lastButtonTime) > BUTTON_INACTIVITY_TIME))) {
OLED::setDisplayState(OLED::DisplayState::OFF);
setStatusLED(LED_OFF);
} else {

View File

@@ -124,10 +124,11 @@ template <class T, T Kp, T Ki, T Kd, T integral_limit_scale> struct PID {
T output = kp_result + ki_result + kd_result;
// Restrict to max / 0
if (output > max_output)
if (output > max_output) {
output = max_output;
else if (output < 0)
} else if (output < 0) {
output = 0;
}
// Save target_delta to previous target_delta
previous_error_term = target_delta;