Various minor fixes

This commit is contained in:
Oleg Kalachev 2024-12-27 21:52:21 +03:00
parent 43be27c43d
commit 299c8a6a02
3 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,7 @@
* [Моторы]()
* [Радиоуправление]()
* [Гироскоп](gyro.md)
* [Акселерометр]()s
* [Акселерометр]()
* [Оценка состояния]()
* [PID-регулятор]()
* [Режим ACRO]()

View File

@ -32,14 +32,14 @@ void normalizeRC() {
}
void calibrateRC() {
Serial.println("Calibrate RC: move all sticks to maximum positions within 4 seconds");
Serial.println("Calibrate RC: move all sticks to maximum positions in 4 seconds");
Serial.println("··o ··o\n··· ···\n··· ···");
delay(4000);
for (int i = 0; i < 30; i++) readRC(); // ensure the values are updated
for (int i = 0; i < RC_CHANNELS; i++) {
channelMax[i] = channels[i];
}
Serial.println("Calibrate RC: move all sticks to neutral positions within 4 seconds");
Serial.println("Calibrate RC: move all sticks to neutral positions in 4 seconds");
Serial.println("··· ···\n··· ·o·\n·o· ···");
delay(4000);
for (int i = 0; i < 30; i++) readRC(); // ensure the values are updated

View File

@ -28,12 +28,11 @@ float wrapAngle(float angle) {
template <typename T>
void printArray(T arr[], int size) {
Serial.print("{");
for (uint8_t i = 0; i < size; i++) {
Serial.print(arr[i]);
if (i < size - 1) Serial.print(", ");
Serial.printf("%g", static_cast<float>(arr[i]));
if (i < size - 1) Serial.print(" ");
}
Serial.println("}");
Serial.println();
}
// Disable reset on low voltage