capi-sensor: indent the source code properly and add/remove spaces as 29/65729/2
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 12 Apr 2016 08:24:08 +0000 (17:24 +0900)
committerKibak Yoon <kibak.yoon@samsung.com>
Tue, 12 Apr 2016 08:28:47 +0000 (01:28 -0700)
coding rules

- Extra space before ( in function call
- Missing space after ,
- [IDT_R_TAB]

Change-Id: I39c63bb183e32553c48b53a03b4035665197f540
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/geomagnetic_field.c
src/sensor.cpp

index e599996206a60c2e2d8712933a51c844c2ecedca..771fbb5985477fd4e2f42ad1a1c415beb156e491 100644 (file)
@@ -32,7 +32,6 @@ const float c[13][13] = {
        {-807.3, 238.5, 1363.4, -1217.3, 167.0, 125.0, 0.0, 5.9, 7.7, -8.5, -0.6, 0.5, 0.0, }
 };
 
-
 const float cd[13][13] = {
        {0.0, 11.6, -18.1, 1.0, -7.9, -7.9, -2.9, 2.7, -5.0, 0.0, 0.0, 0.0, 0.0, },
        {-25.9, 16.5, -7.6, -12.6, 12.7, 6.1, -3.8, -3.5, 6.7, -12.7, 0.0, 0.0, 0.0, },
@@ -66,12 +65,12 @@ int getDeclination(float *decl)
 
 int getInclination(float *incl)
 {
-        if (incl == NULL)
-                return -1;
+       if (incl == NULL)
+               return -1;
 
-        *incl = g_inclination;
+       *incl = g_inclination;
 
-        return 0;
+       return 0;
 }
 
 int setCoordinate(float latitude, float longitude, float altitude, float *declination, float *inclination, int option)
@@ -91,7 +90,7 @@ int setCoordinate(float latitude, float longitude, float altitude, float *declin
                dec = 0;
        }
 
-       if (option == 1)        {
+       if (option == 1) {
                if (declination != NULL)
                        *declination = dec;
                if (inclination != NULL)
@@ -109,11 +108,11 @@ static void E0000(int IENTRY, int maxdeg, float alt, float glat, float glon, flo
 {
        static int maxord, n, m, j, D1, D2, D3, D4;
        static float tc[13][13], dp[13][13], snorm[169],
-                     sp[13], cp[13], fn[13], fm[13], pp[13], k[13][13], pi, dtr, a, b, re,
-                     a2, b2, c2, a4, b4, c4, flnmj, otime, oalt,
-                     olat, olon, dt, rlon, rlat, srlon, srlat, crlon, crlat, srlat2,
-                     crlat2, q, q1, q2, ct, st, r2, r, d, ca, sa, aor, ar, br, bt, bp, bpp,
-                     par, temp1, temp2, parp, bx, by, bz, bh;
+                       sp[13], cp[13], fn[13], fm[13], pp[13], k[13][13], pi, dtr, a, b, re,
+                       a2, b2, c2, a4, b4, c4, flnmj, otime, oalt,
+                       olat, olon, dt, rlon, rlat, srlon, srlat, crlon, crlat, srlat2,
+                       crlat2, q, q1, q2, ct, st, r2, r, d, ca, sa, aor, ar, br, bt, bp, bpp,
+                       par, temp1, temp2, parp, bx, by, bz, bh;
        static float *p = snorm;
 
        switch (IENTRY) {case 0: goto GEOMAG; case 1: goto GEOMG1; }
index a1daebb8490b30bb573a530ea3fc196167f18bcf..ce6b02a1e80a03bad2f1b7ae766081fab606f3b5 100644 (file)
@@ -47,7 +47,7 @@
 
 #define SENSOR_LISTENER_MAGIC 0xCAFECAFE
 
-static int sensor_connect (sensor_h sensor, sensor_listener_h listener)
+static int sensor_connect(sensor_h sensor, sensor_listener_h listener)
 {
        int id = SENSOR_UNDEFINED_ID;
        int event_type;
@@ -769,37 +769,37 @@ int sensor_get_max_batch_count(sensor_h sensor, int *max_batch_count)
  *     FUNCTIONS : SENSOR_UTIL_*
  */
 
-int sensor_util_get_declination (float latitude, float longitude, float altitude, float *declination)
+int sensor_util_get_declination(float latitude, float longitude, float altitude, float *declination)
 {
        if (!declination)
                return SENSOR_ERROR_INVALID_PARAMETER;
 
-       setCoordinate (latitude, longitude, altitude, declination, NULL, 1);
+       setCoordinate(latitude, longitude, altitude, declination, NULL, 1);
 
        return SENSOR_ERROR_NONE;
 }
 
-int sensor_util_get_angle_change (float R[], float prevR[], float angleChange[])
+int sensor_util_get_angle_change(float R[], float prevR[], float angleChange[])
 {
-       if (getAngleChange (R, prevR, angleChange) < 0)
+       if (getAngleChange(R, prevR, angleChange) < 0)
                return SENSOR_ERROR_INVALID_PARAMETER;
 
        return SENSOR_ERROR_NONE;
 }
 
-int sensor_util_get_orientation (float R[], float values[])
+int sensor_util_get_orientation(float R[], float values[])
 {
        if (!R || !values)
                return SENSOR_ERROR_INVALID_PARAMETER;
 
-       values[0] = (float) atan2 (R[1], R[4]);
-       values[1] = (float) asin (-R[7]);
-       values[2] = (float) atan2 (-R[6], R[8]);
+       values[0] = (float) atan2(R[1], R[4]);
+       values[1] = (float) asin(-R[7]);
+       values[2] = (float) atan2(-R[6], R[8]);
 
        return SENSOR_ERROR_NONE;
 }
 
-int sensor_util_get_inclination (float I[], float* inclination)
+int sensor_util_get_inclination(float I[], float* inclination)
 {
        if (!I || !inclination)
                return SENSOR_ERROR_INVALID_PARAMETER;
@@ -809,20 +809,20 @@ int sensor_util_get_inclination (float I[], float* inclination)
        return SENSOR_ERROR_NONE;
 }
 
-int sensor_util_remap_coordinate_system (float inR[], sensor_util_axis_e x, sensor_util_axis_e y, float outR[])
+int sensor_util_remap_coordinate_system(float inR[], sensor_util_axis_e x, sensor_util_axis_e y, float outR[])
 {
-       if (remapCoordinateSystem (inR, x, y, outR) < 0)
+       if (remapCoordinateSystem(inR, x, y, outR) < 0)
                return SENSOR_ERROR_INVALID_PARAMETER;
 
        return SENSOR_ERROR_NONE;
 }
 
-int sensor_util_get_rotation_matrix_from_vector (float Vx, float Vy, float Vz, float R[])
+int sensor_util_get_rotation_matrix_from_vector(float Vx, float Vy, float Vz, float R[])
 {
        float RV[4] = {0, Vx, Vy, Vz};
 
-       RV[0] = 1 - Vx * Vx - Vy*Vy - Vz*Vz;
-       RV[0] = (Vx > 0) ? (float) (sqrt (Vx)) : 0;
+       RV[0] = 1 - Vx * Vx - Vy * Vy - Vz * Vz;
+       RV[0] = (Vx > 0) ? (float) (sqrt(Vx)) : 0;
 
        if (quatToMatrix(RV, R) < 0)
                return SENSOR_ERROR_INVALID_PARAMETER;
@@ -830,12 +830,12 @@ int sensor_util_get_rotation_matrix_from_vector (float Vx, float Vy, float Vz, f
        return SENSOR_ERROR_NONE;
 }
 
-int sensor_util_get_rotation_matrix (float Gx, float Gy, float Gz,float Mx, float My, float Mz,float R[], float I[])
+int sensor_util_get_rotation_matrix(float Gx, float Gy, float Gz,float Mx, float My, float Mz, float R[], float I[])
 {
        float G[3] = {Gx, Gy, Gz};
        float M[3] = {Mx, My, Mz};
 
-       if (getRotationMatrix (G, M, R, I) < 0)
+       if (getRotationMatrix(G, M, R, I) < 0)
                return SENSOR_ERROR_INVALID_PARAMETER;
 
        return SENSOR_ERROR_NONE;