chore: remove joystick logging

This commit is contained in:
2026-04-28 19:21:07 +02:00
parent b63c610665
commit 511beae681
4 changed files with 1 additions and 26 deletions
-1
View File
@@ -10,7 +10,6 @@ class Display {
Display(uint8_t addr = 0x27, uint8_t cols = 20, uint8_t rows = 4);
void begin();
void drawJoystick(double x, double y, bool pressed);
private:
LiquidCrystal_I2C lcd;
};
-2
View File
@@ -11,8 +11,6 @@
*
* Note: The button is active LOW and requires a pull-up resistor, which can either be external (10kΩ)
* or the internal pull-up resistor of the microcontroller (default).
*
* TODO: Add "deadzone" handling to prevent small joystick movements from being registered as input.
*/
class Joystick {
public:
-13
View File
@@ -8,17 +8,4 @@ void Display::begin() {
lcd.backlight();
}
// TODO: Remove this method in the future
void Display::drawJoystick(double x, double y, bool pressed) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("X:");
lcd.print(x, 2); // Print X value with 2 decimal places
lcd.print(" Y:");
lcd.print(y, 2); // Print Y value with 2 decimal places
lcd.setCursor(0, 1);
lcd.print("Pressed: ");
lcd.print(pressed ? "Yes" : "No");
}
+1 -10
View File
@@ -17,13 +17,4 @@ void setup() {
}
void loop() {
double x = joystick.getX();
double y = joystick.getY();
bool pressed = joystick.isPressed();
printf("X: %.2f | Y: %.2f | Pressed: %s\n", x, y, pressed ? "Yes" : "No");
display.drawJoystick(x, y, pressed);
digitalWrite(LED_BUILTIN, pressed ? HIGH : LOW);
delay(500);}
}