From 5340ad53d5c4e58ff580b79f1a463d24c8757b67 Mon Sep 17 00:00:00 2001 From: SUE Date: Wed, 25 May 2022 01:23:21 +0000 Subject: [PATCH 1/2] Signed-off-by:hellohyh001 --- .../test/unittest/ExampleJsunit.test.js | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/interfaces/plugin/test/unittest/ExampleJsunit.test.js b/interfaces/plugin/test/unittest/ExampleJsunit.test.js index ff75e1a6..c81d1f35 100644 --- a/interfaces/plugin/test/unittest/ExampleJsunit.test.js +++ b/interfaces/plugin/test/unittest/ExampleJsunit.test.js @@ -462,38 +462,6 @@ describe("SensorJsTest", function () { Promise.all(promiseArray).then(done) }) - /** - * test - * - * @tc.name: SensorJsTest_019 - * @tc.desc: Verification results of the incorrect parameters of the test interface. - * @tc.require: AR000GH2U6 - * @tc.author: - */ - it('SensorJsTest_019', 0, async function (done) { - console.info("---------------------------SensorJsTest_019----------------------------------"); - let geomagneticComponent = [27779.234375, -6214.9794921875, -14924.6611328125, -27.667943954467773, -12.610970497131348, 28465.9765625, 32141.2109375] - sensor.getGeomagneticField({'latitude':0, 'longitude':0, 'altitude':0}, Number.MAX_VALUE, (error, data) => { - if (error) { - console.info('SensorJsTest_019 failed'); - expect(false).assertTrue(); - } else { - console.info('SensorJsTest_019 x: ' + data.x + ',y: ' + data.y + ',z: ' + data.z + ',geomagneticDip: ' + data.geomagneticDip - + ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',totalIntensity: ' + data.totalIntensity) - expect(data.x).assertEqual(geomagneticComponent[0]) - expect(data.y).assertEqual(geomagneticComponent[1]) - expect(data.z).assertEqual(geomagneticComponent[2]) - expect(data.geomagneticDip).assertEqual(geomagneticComponent[3]) - expect(data.deflectionAngle).assertEqual(geomagneticComponent[4]) - expect(data.levelIntensity).assertEqual(geomagneticComponent[5]) - expect(data.totalIntensity).assertEqual(geomagneticComponent[6]) - } - setTimeout(() =>{ - done() - }, 500) - }) - }) - /** * test * @@ -1108,33 +1076,6 @@ describe("SensorJsTest", function () { done() }) - /** - * test - * - * @tc.name: SensorJsTest_043 - * @tc.desc: Verification results of the incorrect parameters of the test interface. - * @tc.require: AR000GH2UB - * @tc.author: - */ - it("SensorJsTest_043", 0, async function (done) { - console.info('----------------------SensorJsTest_043---------------------------'); - let geomagneticComponent = [27779.234375, -6214.9794921875, -14924.6611328125, -27.667943954467773, -12.610970497131348, 28465.9765625, 32141.2109375] - await sensor.getGeomagneticField({'latitude':0, 'longitude':0, 'altitude':0}, Number.MAX_VALUE).then((data) => { - console.info('SensorJsTest_043 x: ' + data.x + ',y: ' + data.y + ',z: ' + data.z + ',geomagneticDip: ' + data.geomagneticDip - + ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',totalIntensity: ' + data.totalIntensity) - expect(data.x).assertEqual(geomagneticComponent[0]) - expect(data.y).assertEqual(geomagneticComponent[1]) - expect(data.z).assertEqual(geomagneticComponent[2]) - expect(data.geomagneticDip).assertEqual(geomagneticComponent[3]) - expect(data.deflectionAngle).assertEqual(geomagneticComponent[4]) - expect(data.levelIntensity).assertEqual(geomagneticComponent[5]) - expect(data.totalIntensity).assertEqual(geomagneticComponent[6]) - }).catch((error) => { - console.info("promise::catch", error) - }); - done() - }) - /** * test * -- Gitee From ac65b3e5a571ea98952f012f928c0f0f0c9d841c Mon Sep 17 00:00:00 2001 From: li-yaoyao777 Date: Mon, 1 Aug 2022 15:21:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=95=B4=E6=94=B9=E5=8D=95=E8=AF=8D?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-yaoyao777 --- interfaces/native/include/sensor_agent_type.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interfaces/native/include/sensor_agent_type.h b/interfaces/native/include/sensor_agent_type.h index 6486ac96..7a047588 100644 --- a/interfaces/native/include/sensor_agent_type.h +++ b/interfaces/native/include/sensor_agent_type.h @@ -188,7 +188,7 @@ typedef struct LinearAccelData { float x; float y; float z; -} LineraAccelData; +} LinearAccelData; /** * @brief Defines the gyroscope sensor data structure. Measures the rotational angular velocity of the @@ -211,7 +211,7 @@ typedef struct GravityData { } GravityData; /** - * @brief Defines the uncalibred accelerometer data structure. Measures the uncalibred accelerometer applied to + * @brief Defines the uncalibrated accelerometer data structure. Measures the uncalibrated accelerometer applied to * the device on three physical axes (x, y, and z) in m/s2. */ typedef struct AccelUncalibratedData { @@ -224,7 +224,7 @@ typedef struct AccelUncalibratedData { } AccelUncalibratedData; /** - * @brief Defines the uncalibred gyroscope sensor data structure. Measures the uncalibred rotational angular velocity of the + * @brief Defines the uncalibrated gyroscope sensor data structure. Measures the uncalibrated rotational angular velocity of the * device on three physical axes (x, y, and z) in rad/s. */ typedef struct GyroUncalibratedData { @@ -286,7 +286,7 @@ typedef struct MagneticFieldData { } MagneticFieldData; /** - * @brief Defines the uncalibred magnetic field sensor data structure. Measure the uncalibred ambient geomagnetic field in three + * @brief Defines the uncalibrated magnetic field sensor data structure. Measure the uncalibrated ambient geomagnetic field in three * physical axes (x, y, z) in μT. */ typedef struct MagneticFieldUncalibratedData { -- Gitee