added missing CONSTRAIN and MAP defines

This commit is contained in:
tims
2025-03-07 11:56:21 +01:00
parent 57f5e63586
commit 73c78242e9

View File

@@ -26,7 +26,11 @@
int mpu9250_Imu_Init(void *pdata);
int mpu9250_CalculateAngle(void *pdata);
/* Enforce min <= input <= max */
#define CONSTRAIN(input, min, max) ((input) > (max) ? (max) : ((input) < (min) ? (min) : input))
/* Map value to region */
#define MAP(input, in_min, in_max, out_min, out_max) ((((input) - (in_min)) * ((out_max) - (out_min))) / ((in_max) - (in_min)) + (out_min))
#endif /* SRC_APP_AUFGABE7_PS7_CORE0_CFG_IMU_H_ */