From c16ac482bd97e620e9e50ff470b70bc2a4d651b6 Mon Sep 17 00:00:00 2001 From: Bernhard Date: Wed, 17 Dec 2025 19:35:30 +0100 Subject: [PATCH] =?UTF-8?q?Alles=20wieder=20hinzuf=C3=BCgen=3F=3F=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- io/io.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/io/io.c b/io/io.c index 875548d..5e754dd 100755 --- a/io/io.c +++ b/io/io.c @@ -9,6 +9,8 @@ struct GPIO_KEY_DATA gpioKeyPwrDown; char nInitialized = 0; +/// @brief Initialize the io pins +/// @return int IO_Init() { if (wiringPiSetupPinType(WPI_PIN_BCM)) @@ -193,13 +195,13 @@ void IO_DoCyclic() // plus key is pressed -> increase power if (motctrl[0].iMotorGear == MOTOR_GEAR_NEUTRAL) { - mylog(LOG_INFO, "KEY-Plus: Start motor."); + mylog(LOG_INFO, "IO: KEY-Plus: Start motor."); Can_SetMotorGear(0, 1); Can_SetMotorPower(0, MOTOR_PWR_MIN_PCT); } else { - mylog(LOG_INFO, "KEY-Plus: Increase power."); + mylog(LOG_INFO, "IO: KEY-Plus: Increase power."); Can_SetMotorPower(0, motctrl[0].iMotorPowerPct + MOTOR_PWR_STEP); } } @@ -209,12 +211,12 @@ void IO_DoCyclic() // minus key is pressed -> decrease power if (motctrl[0].iMotorPowerPct > MOTOR_PWR_MIN_PCT) { - mylog(LOG_INFO, "KEY-Minus: Decrease power."); + mylog(LOG_INFO, "IO: KEY-Minus: Decrease power."); Can_SetMotorPower(0, motctrl[0].iMotorPowerPct - MOTOR_PWR_STEP); } else { - mylog(LOG_INFO, "KEY-Minus: Stop motor."); + mylog(LOG_INFO, "IO: KEY-Minus: Stop motor."); Can_SetMotorGear(0, 0); } }