From 0f7ed882157a43cc16b6e7b9943fa017c2f349f9 Mon Sep 17 00:00:00 2001 From: xeonqq Date: Fri, 28 Jul 2023 12:33:44 +0200 Subject: [PATCH] Adapt coding style --- samples/Accel_Gyro_MPU6050/app/application.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/Accel_Gyro_MPU6050/app/application.cpp b/samples/Accel_Gyro_MPU6050/app/application.cpp index d49c231127..1506994989 100644 --- a/samples/Accel_Gyro_MPU6050/app/application.cpp +++ b/samples/Accel_Gyro_MPU6050/app/application.cpp @@ -1,11 +1,11 @@ #include #include -constexpr float main_loop_interval = 0.02; // sec -SimpleTimer main_loop_timer; +constexpr float mainLoopInterval = 0.02; // sec +SimpleTimer mainLoopTimer; MPU6050 mpu; -void print_accel_gyro(int16_t ax, int16_t ay, int16_t az, int16_t gx, int16_t gy, int16_t gz) +void printAccelGyro(int16_t ax, int16_t ay, int16_t az, int16_t gx, int16_t gy, int16_t gz) { Serial.print("a/g:\t"); Serial.print(ax); @@ -21,12 +21,12 @@ void print_accel_gyro(int16_t ax, int16_t ay, int16_t az, int16_t gx, int16_t gy Serial.println(gz); } -void main_loop() +void mainLoop() { int16_t ax, ay, az; int16_t gx, gy, gz; mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); - print_accel_gyro(ax, ay, az, gx, gy, gz); + printAccelGyro(ax, ay, az, gx, gy, gz); } void init() @@ -38,5 +38,5 @@ void init() mpu.initialize(); Serial.println(mpu.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed"); - main_loop_timer.initializeMs(static_cast(main_loop_interval * 1000), main_loop).start(); + mainLoopTimer.initializeMs(static_cast(mainLoopInterval * 1000), mainLoop).start(); }